]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[objective-c/c++, testsuite] Fix stubify tests for -fnext-runtime.
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 4 Nov 2019 23:06:21 +0000 (23:06 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Mon, 4 Nov 2019 23:06:21 +0000 (23:06 +0000)
Fixed to work for x86 as well as powerpc (use the final assembler output
instead of the jump rtl which varies between X86 and PPC).  Amended the
options to reflect this change.

gcc/testsuite/

Backport from mainline.
2019-06-20  Iain Sandoe  <iain@sandoe.co.uk>

* obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks.
* obj-c++.dg/stubify-2.mm: Likewise.
* objc.dg/stubify-1.m: Likewise.
* objc.dg/stubify-2.m: Likewise.

From-SVN: r277800

gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/stubify-1.mm
gcc/testsuite/obj-c++.dg/stubify-2.mm
gcc/testsuite/objc.dg/stubify-1.m
gcc/testsuite/objc.dg/stubify-2.m

index 9d908253f4b199479d3da6a0101425da64d0a3fd..17f417ecbf580701815f4b283a65ea4e9225ec07 100644 (file)
@@ -1,3 +1,13 @@
+2019-11-04  Iain Sandoe  <iain@sandoe.co.uk>
+
+       Backport from mainline.
+       2019-06-20  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks.
+       * obj-c++.dg/stubify-2.mm: Likewise.
+       * objc.dg/stubify-1.m: Likewise.
+       * objc.dg/stubify-2.m: Likewise.
+
 2019-11-04  Tobias Burnus  <tobias@codesourcery.com>
 
        Backport from mainline
index 46ce3fb815856c10ea515d5d43abda02745abf60..e8f21882de96c479312b6c341b760460a78fc9b1 100644 (file)
@@ -4,7 +4,7 @@
 /* { dg-do compile { target *-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
-/* { dg-options "-Os -mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4 -msymbol-stubs" } */
+/* { dg-options "-mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4 -msymbol-stubs" } */
 
 typedef struct objc_object { } *id ;
 int x = 41 ;
@@ -32,8 +32,8 @@ extern "C" {
 }
 @end
 
-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_objc_msgSend\n" } } */
-/* { dg-final { scan-assembler     "\(bl|call\)\[ \t\]+L_objc_msgSend\\\$stub\n" } } */
-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_bogonic\n" } } */
-/* { dg-final { scan-assembler     "\(bl|call\)\[ \t\]+L_bogonic\\\$stub\n" } } */
-/* { dg-final { scan-assembler-not "\\\$non_lazy_ptr" } } */
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_bogonic\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L_bogonic\$stub\n} } } */
+/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */
index dd88974e2594427e2d3288beb0598c024f45429b..1863f986ce03fec4d1380b7fb69c97cb2757be73 100644 (file)
@@ -4,7 +4,7 @@
 /* { dg-do compile { target *-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
-/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4 -msymbol-stubs" } */
+/* { dg-options "-mdynamic-no-pic -mmacosx-version-min=10.4 -msymbol-stubs" } */
 
 typedef struct objc_object { } *id ;
 int x = 41 ;
@@ -30,4 +30,9 @@ extern int bogonic (int, int, int) ;
 
 /* Any symbol_ref of an un-stubified objc_msgSend is an error; look
    for "objc_msgSend" in quotes, without the $stub suffix. */
-/* { dg-final {  scan-rtl-dump-not "symbol_ref.*\"objc_msgSend\"" "jump" } } */
+
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_Z7bogoniciii\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L__Z7bogoniciii\$stub\n} } } */
+/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */
index 97d5b598380e371152f7e240acc3c1cfe6b26b10..641595ccfe4c62597b422edc831ca27139999fec 100644 (file)
@@ -28,8 +28,8 @@ extern int bogonic (int, int, int) ;
 }
 @end
 
-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_objc_msgSend\n" } } */
-/* { dg-final { scan-assembler     "\(bl|call\)\[ \t\]+L_objc_msgSend\\\$stub\n" } } */
-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_bogonic\n" } } */
-/* { dg-final { scan-assembler     "\(bl|call\)\[ \t\]+L_bogonic\\\$stub\n" } } */
-/* { dg-final { scan-assembler-not "\\\$non_lazy_ptr" } } */
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_bogonic\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L_bogonic\$stub\n} } } */
+/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */
index a07992a5a9e4c64b5c44a4e6e7940bcd5c65fca3..2930e46fc136995877bf36cc901450749eb61ae5 100644 (file)
@@ -1,10 +1,10 @@
 /* All calls must be properly stubified, m32 only.  */
 /* Testcase extracted from TextEdit:Document.m.  */
 
-/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-do compile { target *-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
-/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4 -msymbol-stubs" } */
+/* { dg-options "-mdynamic-no-pic -mmacosx-version-min=10.4 -msymbol-stubs" } */
 
 typedef struct objc_object { } *id ;
 int x = 41 ;
@@ -30,4 +30,9 @@ extern int bogonic (int, int, int) ;
 
 /* Any symbol_ref of an un-stubified objc_msgSend is an error; look
    for "objc_msgSend" in quotes, without the $stub suffix.  */
-/* { dg-final { scan-rtl-dump-not "symbol_ref.*\"objc_msgSend\"" "jump" } } */
+
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */
+/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_bogonic\n} } } */
+/* { dg-final { scan-assembler     {(bl|call)[ \t]+L_bogonic\$stub\n} } } */
+/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */