diff mbox

[testsuite] gcc.dg/pr45259.c: fix dg-options for non-fpic

Message ID 5011C3E7.1020707@mentor.com
State New
Headers show

Commit Message

Janis Johnson July 26, 2012, 10:25 p.m. UTC
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  <janisjo@codesourcery.com>

	* gcc.dg/pr45259.c: Only -fpic depends on fpic support.
diff mbox

Patch

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; };