[committed] Add fpic requirement to tests that use PIC options

Richard Sandiford richard@codesourcery.com
Fri Mar 16 09:52:00 GMT 2007


Hans-Peter Nilsson <hp@bitrange.com> writes:
> On Fri, 16 Mar 2007, Richard Sandiford wrote:
>> Argh, yes indeed.  I was supposedly trying to make sure that when the
>> default options were non-PIC, I'd patched the offending PIC dg-options
>> instead (as in 981006.c), but I fluffed it in this case.  Fixed with
>> the patch below, thanks.
>
> I saw no patch "below", but in SVN was the obvious change save
> for it being non-obvious that "{ ... } && ilp32 && fpic" is
> invalid syntax and must be expressed as "{ ... } && { ilp32 && fpic }"
> (right?)

Oops... (and right, AIUI)

gcc/testsuite/
	* gcc.dg/20020426-2.c: Add the fpic requirement to the PIC
	dg-options rather than to the whole test.

Index: gcc/testsuite/gcc.dg/20020426-2.c
===================================================================
--- gcc/testsuite/gcc.dg/20020426-2.c	(revision 122958)
+++ gcc/testsuite/gcc.dg/20020426-2.c	(working copy)
@@ -2,8 +2,7 @@
    Distilled from zlib sources.  */
 /* { dg-do run } */
 /* { dg-options "-O2" } */
-/* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mtune=i686" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mtune=i686" { target { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } } } */
 /* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
 
 extern void exit (int);



More information about the Gcc-patches mailing list