[PATCH]: testsuite PIC fix for first-global.C & attr-externally-visible-1.C
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Sat Jan 26 22:35:00 GMT 2008
These tests need -fpie for *all* pic targets, not just darwin.
Tested via "make check" on x86_64-unknown-linux-gnu.
Okay for mainline?
Thanks,
--Kaveh
2008-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.dg/other/first-global.C: Add -fpie for all pic targets.
* g++.dg/parse/attr-externally-visible-1.C: Likewise.
diff -rup orig/egcc-SVN20080126/gcc/testsuite/g++.dg/other/first-global.C egcc-SVN20080126/gcc/testsuite/g++.dg/other/first-global.C
--- orig/egcc-SVN20080126/gcc/testsuite/g++.dg/other/first-global.C 2008-01-24 22:51:53.000000000 +0100
+++ egcc-SVN20080126/gcc/testsuite/g++.dg/other/first-global.C 2008-01-26 18:50:55.000000000 +0100
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fpie" { target *-*-darwin* } } */
+/* { dg-options "-fpie" { target { ! nonpic } } } */
/* { dg-final { scan-assembler "_GLOBAL__I(_|_65535_0_)foobar" } } */
struct foo { foo (); };
diff -rup orig/egcc-SVN20080126/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C egcc-SVN20080126/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C
--- orig/egcc-SVN20080126/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C 2007-12-31 19:13:21.000000000 +0100
+++ egcc-SVN20080126/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C 2008-01-26 19:23:01.000000000 +0100
@@ -1,6 +1,6 @@
// { dg-do compile }
// { dg-options "-O3 -fwhole-program" }
-/* { dg-options "-O3 -fwhole-program -fpie" { target *-*-darwin* } } */
+// { dg-options "-O3 -fwhole-program -fpie" { target { ! nonpic } } }
// { dg-final { scan-assembler "foo1" } }
// { dg-final { scan-assembler "foo2" } }
// { dg-final { scan-assembler "foo3" } }
More information about the Gcc-patches
mailing list