[committed] Add a couple of fpic dependencies to the C++ testsuite

Richard Sandiford richard@codesourcery.com
Thu Mar 15 21:44:00 GMT 2007


I found a couple of C++ tests that forced PIC options without checking
for fpic targets.  Tested on x86_64-linux-gnu and a customised
i586-wrs-vxworks.  Applied as obvious.

Richard


gcc/testsuite/
	* g++.dg/opt/mmx1.C: Only use the PIC options for fpic targets.
	* g++.old-deja/g++.other/store-expr1.C: Require fpic.

Index: gcc/testsuite/g++.dg/opt/mmx1.C
===================================================================
--- gcc/testsuite/g++.dg/opt/mmx1.C	(revision 165824)
+++ gcc/testsuite/g++.dg/opt/mmx1.C	(working copy)
@@ -3,7 +3,7 @@
 // mmx -> mmx register moves.
 // { dg-do compile }
 // { dg-options "-O2" }
-// { dg-options "-fno-exceptions -O2 -mmmx -fPIC" { target { { i?86-*-* x86_64-*-* } && ilp32 }  } }
+// { dg-options "-fno-exceptions -O2 -mmmx -fPIC" { target { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } } }
 
 struct A {
   unsigned a0;
Index: gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.other/store-expr1.C	(revision 165824)
+++ gcc/testsuite/g++.old-deja/g++.other/store-expr1.C	(working copy)
@@ -1,5 +1,6 @@
 // { dg-do run { target i?86-*-* x86_64-*-* } }
 // { dg-require-effective-target ilp32 }
+// { dg-require-effective-target fpic }
 // { dg-options "-mtune=i686 -O2 -fpic" }
 // { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))|\[Bb\]ad fixup at .DATA.:" "PIC unsupported" { xfail *-*-netware* } 0 }
 class G {};



More information about the Gcc-patches mailing list