asm1.C: Don't detect pic via looking for the -fpic/-fPIC flags.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 10 Mar 2010 19:29:50 +0000 (19:29 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 10 Mar 2010 19:29:50 +0000 (19:29 +0000)
* g++.old-deja/g++.pt/asm1.C: Don't detect pic via looking for the
-fpic/-fPIC flags.
* g++.old-deja/g++.pt/asm2.C: Likewise.
* gcc.c-torture/compile/20000804-1.c: Likewise.
* gcc.target/i386/clobbers.c: Likewise.

From-SVN: r157365

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.pt/asm1.C
gcc/testsuite/g++.old-deja/g++.pt/asm2.C
gcc/testsuite/gcc.c-torture/compile/20000804-1.c
gcc/testsuite/gcc.target/i386/clobbers.c

index 9e4df9afad570d9ff2f31c3a65eb7bb8e2c06701..7c29203abc9f1d612ccc7d3294f3590c4e0476f6 100644 (file)
@@ -1,3 +1,11 @@
+2010-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * g++.old-deja/g++.pt/asm1.C: Don't detect pic via looking for the
+       -fpic/-fPIC flags.
+       * g++.old-deja/g++.pt/asm2.C: Likewise.
+       * gcc.c-torture/compile/20000804-1.c: Likewise.
+       * gcc.target/i386/clobbers.c: Likewise.
+
 2010-03-10  Tobias Burnus  <burnus@net-b.de
 
        PR fortran/43303
index 8de6b767932c06a7a6131561cde51941eeb2dc2f..8e54a8ed54a0806b13f4e1eb0e4a422a9e837b7d 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
-// We'd use ebx with -fpic/-fPIC, so skip.
-// { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } }
+// We'd use ebx with 32-bit pic code, so skip.
+// { dg-skip-if "" { ilp32 && { ! nonpic } } { "*" } { "" } }
 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
 
 template<int i> int foo(int v)
index 90e494bf55cbf2feffbec6e0f0fbc26228ea14fb..7a7063790acedbb4ba33bacc7cb539f7f114cd69 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
 // { dg-require-effective-target ilp32 }
-// We'd use ebx with -fpic/-fPIC, so skip.
-// { dg-skip-if "" { *-*-* } { "-fpic" "-fPIC" } { "" } }
+// We'd use ebx with 32-bit pic code, so require nonpic.
+// { dg-require-effective-target nonpic }
 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
 
 typedef void (function_ptr)(int);
index d1b351584d4ed10267734a1c4f93bd7b68347f4b..ff4110273bee1dc84bc8a9afbf52d8f43d799525 100644 (file)
@@ -1,8 +1,7 @@
 /* This does not work on m68hc11 or h8300 due to the use of an asm
    statement to force a 'long long' (64-bits) to go in a register.  */
 /* { dg-do assemble } */
-/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { "" } } */
-/* { dg-skip-if "PIC default" { { i?86-*-darwin*  x86_64-*-darwin* } && ilp32 } { "*" } { "" } } */
+/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ilp32 && { ! nonpic } } } { "*" } { "" } } */
 /* { dg-skip-if "No 64-bit registers" { m32c-*-* } { "*" } { "" } } */
 /* { dg-xfail-if "" { m6811-*-* m6812-*-* h8300-*-* } { "*" } { "" } } */
 
index 7e8b200c6ff7f46bf9412ffff2464e5a3511be95..17987db97011ec4aa8bf521723134a69a6972f65 100644 (file)
@@ -1,7 +1,6 @@
 /* Test asm clobbers on x86. */
 
 /* { dg-do run } */
-/* { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } } */
 
 extern void abort (void);
 
@@ -13,11 +12,15 @@ int main ()
                 abort ();
        /* On darwin you can't call external functions from non-pic code,
           however, clobbering ebx isn't valid in pic code. Instead of
-          disabling the whole test, just disable the ebx clobbering part.  */
+          disabling the whole test, just disable the ebx clobbering part.
+          Ditto for any x86 system that is ilp32 && pic.
+       */
 #if !(defined (__MACH__))
+#if ! defined (__PIC__) || defined (__LP64__)
         __asm__ ("movl $1,%0\n\txorl %%ebx,%%ebx" : "=r" (i) : : "ebx");
         if (i != 1)
                 abort ();
+#endif /* ! pic || lp64 */
 #endif
         __asm__ ("movl $1,%0\n\txorl %%ecx,%%ecx" : "=r" (i) : : "ecx");
         if (i != 1)