Test gcc.dg/pr45259 fails on targets that don't support fpic because it skips using -w and therefore gets pedantic warnings that are enabled by default. This patch provides an alternate dg-option command to supply options other than -fpic for targets that don't support fpic.
Checked in on trunk, coming soon to the 4.7 branch. Janis
2012-07-26 Janis Johnson <jani...@codesourcery.com> * gcc.dg/pr45259.c: Only -fpic depends on fpic support. Index: gcc/testsuite/gcc.dg/pr45259.c =================================================================== --- gcc/testsuite/gcc.dg/pr45259.c (revision 189892) +++ gcc/testsuite/gcc.dg/pr45259.c (working copy) @@ -1,6 +1,7 @@ /* PR debug/45259 */ /* { dg-do compile } */ -/* { dg-options "-g -O2 -fpic -w" { target fpic } } */ +/* { dg-options "-g -O2 -w -fpic" { target fpic } } */ +/* { dg-options "-g -O2 -w" { target { ! fpic } } } */ struct S { void (*bar) (long); }; struct T { struct S *t; };