* g++.old-deja/g++.pt/asm1.C: Don't detect pic via looking for the
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Mar 2010 19:29:50 +0000 (19:29 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Mar 2010 19:29:50 +0000 (19:29 +0000)
-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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157365 138bc75d-0d04-0410-961f-82ee72b054a4

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 9e4df9a..7c29203 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 8de6b76..8e54a8e 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 90e494b..7a70637 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 d1b3515..ff41102 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 7e8b200..17987db 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)