diff --git a/gcc/testsuite/g++.target/i386/pr35513-1.C b/gcc/testsuite/g++.target/i386/pr35513-1.C
index 6f8db37fb7c9c0a66bc57febc9c8330f6b4c7597..daa615662c5614d6b6152dc28d1cc685ad96b841 100644
--- a/gcc/testsuite/g++.target/i386/pr35513-1.C
+++ b/gcc/testsuite/g++.target/i386/pr35513-1.C
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-do run { target property_1_needed } }
 // { dg-options "-O2 -mno-direct-extern-access" }
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.target/i386/pr35513-2.C b/gcc/testsuite/g++.target/i386/pr35513-2.C
index 9143ff3f0a5ac9911501785042134b56f880605d..ecccdaeb6664a70576800c80b512407059f2c5a6 100644
--- a/gcc/testsuite/g++.target/i386/pr35513-2.C
+++ b/gcc/testsuite/g++.target/i386/pr35513-2.C
@@ -1,4 +1,4 @@
-// { dg-do run  }
+// { dg-do run { target property_1_needed } }
 // { dg-options "-O2 -mno-direct-extern-access" }
 
 class Foo 
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-8.c b/gcc/testsuite/gcc.target/i386/pr35513-8.c
index 7ba67de215629010487c612db15ecb2b281732c8..d51f7efb353ba3a9fbb3cf5a73e0380e2b63c57e 100644
--- a/gcc/testsuite/gcc.target/i386/pr35513-8.c
+++ b/gcc/testsuite/gcc.target/i386/pr35513-8.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
 /* { dg-require-effective-target maybe_x32 } */
 /* { dg-options "-mx32 -O2 -fno-pic -fexceptions -fasynchronous-unwind-tables -mno-direct-extern-access" } */
 
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4463cc8d7ed659c48a7a5babc6037ad173682d57..9a969bfbd17797f7fe37d49a76f09cbb3fffc878 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -30,6 +30,7 @@
 #
 # Assume by default that CONTENTS is C code.  
 # Otherwise, code should contain:
+# "/* Assembly" for assembly code,
 # "// C++" for c++,
 # "// D" for D,
 # "! Fortran" for Fortran code,
@@ -57,6 +58,7 @@ proc check_compile {basename type contents args} {
 	set options ""
     }
     switch -glob -- $contents {
+	"*/* Assembly*" { set src ${basename}[pid].S }
 	"*! Fortran*" { set src ${basename}[pid].f90 }
 	"*// C++*" { set src ${basename}[pid].cc }
 	"*// D*" { set src ${basename}[pid].d }
@@ -11758,3 +11760,38 @@ proc check_effective_target_pytest3 { } {
         return 0;
     }
 }
+
+proc check_effective_target_property_1_needed { } {
+  return [check_no_compiler_messages property_1_needed executable {
+/* Assembly code */
+#ifdef __LP64__
+# define __PROPERTY_ALIGN 3
+#else
+# define __PROPERTY_ALIGN 2
+#endif
+
+	.section ".note.gnu.property", "a"
+	.p2align __PROPERTY_ALIGN
+	.long 1f - 0f		/* name length.  */
+	.long 4f - 1f		/* data length.  */
+	/* NT_GNU_PROPERTY_TYPE_0.   */
+	.long 5			/* note type.  */
+0:
+	.asciz "GNU"		/* vendor name.  */
+1:
+	.p2align __PROPERTY_ALIGN
+	/* GNU_PROPERTY_1_NEEDED.  */
+	.long 0xb0008000	/* pr_type.  */
+	.long 3f - 2f		/* pr_datasz.  */
+2:
+	/* GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS.  */
+	.long 1
+3:
+	.p2align __PROPERTY_ALIGN
+4:
+	.text
+	.globl main
+main:
+	.byte 0
+  } ""]
+}