This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch PR/19226]: fix testcases when using -fpic/-fPIC
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: janis187 at us dot ibm dot com
- Date: Wed, 5 Jan 2005 11:35:55 -0500 (EST)
- Subject: [Patch PR/19226]: fix testcases when using -fpic/-fPIC
As indicated in the PR, the inline asm in these testcases won't work
with -fpic/-fPIC, so I'm adding a dg-skip-if.
Okay for mainline?
Okay for 3.3/3.4 when those branches get dg-skip-if?
Thanks,
--Kaveh
2005-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.pt/asm1.C, g++.old-deja/g++.pt/asm2.C: Bypass
tests on x86 when using -fpic/-fPIC.
diff -rup orig/egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm1.C egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
--- orig/egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm1.C 2003-11-05 12:30:50.000000000 -0500
+++ egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm1.C 2005-01-05 11:24:57.000000000 -0500
@@ -1,4 +1,6 @@
// { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
+// We'd use ebx with -fpic/-fPIC, so skip.
+// { dg-skip-if "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } }
// Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
template<int i> int foo(int v)
diff -rup orig/egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm2.C egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm2.C
--- orig/egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm2.C 2003-04-30 22:02:53.000000000 -0400
+++ egcc-CVS20050104/gcc/testsuite/g++.old-deja/g++.pt/asm2.C 2005-01-05 11:24:57.000000000 -0500
@@ -1,4 +1,6 @@
// { dg-do assemble { target i?86-*-linux* } }
+// We'd use ebx with -fpic/-fPIC, so skip.
+// { dg-skip-if "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } }
// Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
typedef void (function_ptr)(int);