This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed, cleanup of intended users of { target fpic }
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 16 Oct 2005 03:26:10 +0200
- Subject: Committed, cleanup of intended users of { target fpic }
Yep, the tests are now *all* skipped as not supporting
-fpic/-fPIC, where some had target-specific skips and
inconsistently others were previously compiled but related
error/warning messages were being pruned, incidentally on
targets I maintain. IMHO skipping the tests follows the
intention better than providing alternative options to compile
*without* -fpic/-fPIC for non- "{ target fpic }" (see
g++.dg/opt/crossjump1.C).
Gets rid of most remaining FAILs for cris-axis-elf. (Some others
are just malformed tests. :-)
IMO using -fpic / -fPIC should cause an error instead of quietly
emitting non-fpic for targets that don't generate the applicable
"position-independent code", to be linked with -shared.
Committed.
* g++.dg/debug/debug3.C, g++.dg/ext/visibility/noPLT.C,
g++.dg/opt/vt1.C, g++.old-deja/g++.other/local-alloc1.C,
gcc.dg/20001009-1.c, gcc.dg/20010912-1.c, gcc.dg/20020122-4.c,
gcc.dg/20020415-1.c, gcc.dg/20020430-1.c, gcc.dg/20021018-1.c,
gcc.dg/20021023-1.c, gcc.dg/20021029-1.c, gcc.dg/20021116-1.c,
gcc.dg/20030120-1.c, gcc.dg/20030213-1.c, gcc.dg/20030225-1.c,
gcc.dg/20030702-1.c, gcc.dg/20030708-1.c, gcc.dg/20040311-2.c,
gcc.dg/inline-2.c: Guard tests with "{ target fpic }". Remove
previous target-specific skips and warning-message matches where
applicable.
Index: g++.dg/debug/debug3.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/debug/debug3.C,v
retrieving revision 1.2
diff -u -p -r1.2 debug3.C
--- g++.dg/debug/debug3.C 15 Mar 2002 05:36:43 -0000 1.2
+++ g++.dg/debug/debug3.C 16 Oct 2005 00:25:55 -0000
@@ -1,9 +1,8 @@
// PR optimization/5547
// This testcase caused ICE on IA-32, since DWARF-2 was unable
// to emit location expression for parameter a of operator+.
-// { dg-do compile }
+// { dg-do compile { target fpic } }
// { dg-options "-fpic" }
-// { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 }
struct A { char *s; };
Index: g++.dg/ext/visibility/noPLT.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/ext/visibility/noPLT.C,v
retrieving revision 1.1
diff -u -p -r1.1 noPLT.C
--- g++.dg/ext/visibility/noPLT.C 25 Jul 2004 22:52:21 -0000 1.1
+++ g++.dg/ext/visibility/noPLT.C 16 Oct 2005 00:25:56 -0000
@@ -1,5 +1,5 @@
/* Test that -fvisibility=hidden prevents PLT. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-require-visibility "" } */
/* { dg-options "-fPIC -fvisibility=hidden" } */
/* { dg-final { scan-assembler-not "methodEv@PLT" } } */
Index: g++.dg/opt/vt1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/opt/vt1.C,v
retrieving revision 1.3
diff -u -p -r1.3 vt1.C
--- g++.dg/opt/vt1.C 29 Nov 2004 20:30:08 -0000 1.3
+++ g++.dg/opt/vt1.C 16 Oct 2005 00:25:58 -0000
@@ -1,6 +1,5 @@
// Test whether vtable for S is not put into read-only section.
-// { dg-do compile }
-// { dg-skip-if "No -fpic" { mmix-*-* } { "*" } { "" } }
+// { dg-do compile { target fpic } }
// { dg-options "-O2 -fpic -fno-rtti" }
// Origin: Jakub Jelinek <jakub@redhat.com>
Index: g++.old-deja/g++.other/local-alloc1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C,v
retrieving revision 1.4
diff -u -p -r1.4 local-alloc1.C
--- g++.old-deja/g++.other/local-alloc1.C 29 Nov 2004 20:58:42 -0000 1.4
+++ g++.old-deja/g++.other/local-alloc1.C 16 Oct 2005 00:26:07 -0000
@@ -1,7 +1,6 @@
-// { dg-do assemble }
+// { dg-do assemble { target fpic } }
// { dg-options "-O0 -fpic" }
// Origin: Jakub Jelinek <jakub@redhat.com>
-// { dg-skip-if "No -fpic" { cris-*-elf* cris-*-aout* mmix-*-* } { "*" } { "" } }
struct bar {
bar() {}
Index: gcc.dg/20001009-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20001009-1.c,v
retrieving revision 1.2
diff -u -p -r1.2 20001009-1.c
--- gcc.dg/20001009-1.c 15 Mar 2002 05:36:37 -0000 1.2
+++ gcc.dg/20001009-1.c 16 Oct 2005 00:26:17 -0000
@@ -1,6 +1,5 @@
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
extern void foo (void *a, double x, double y);
void
Index: gcc.dg/20010912-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20010912-1.c,v
retrieving revision 1.4
diff -u -p -r1.4 20010912-1.c
--- gcc.dg/20010912-1.c 3 Sep 2004 18:09:32 -0000 1.4
+++ gcc.dg/20010912-1.c 16 Oct 2005 00:26:17 -0000
@@ -1,6 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { target fpic } } */
/* { dg-options "-O2 -fpic" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
/* { 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 abort (void);
Index: gcc.dg/20020122-4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20020122-4.c,v
retrieving revision 1.3
diff -u -p -r1.3 20020122-4.c
--- gcc.dg/20020122-4.c 15 Mar 2002 05:36:37 -0000 1.3
+++ gcc.dg/20020122-4.c 16 Oct 2005 00:26:17 -0000
@@ -1,8 +1,7 @@
/* Alpha -msmall-data didn't transform (mem (symbol_ref)) to
(mem (lo_sum pic (symbol_ref))) within an asm at the right time. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
void foo()
{
Index: gcc.dg/20020415-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20020415-1.c,v
retrieving revision 1.2
diff -u -p -r1.2 20020415-1.c
--- gcc.dg/20020415-1.c 22 Apr 2002 01:19:05 -0000 1.2
+++ gcc.dg/20020415-1.c 16 Oct 2005 00:26:17 -0000
@@ -1,9 +1,8 @@
/* PR target/6303
This testcase ICEd because s390 did not define
ASM_SIMPLIFY_DWARF_ADDR hook. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic -g" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* mmix-*-* } 0 } */
static inline char *
bar (unsigned long x, char *y)
Index: gcc.dg/20020430-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20020430-1.c,v
retrieving revision 1.3
diff -u -p -r1.3 20020430-1.c
--- gcc.dg/20020430-1.c 7 Feb 2003 03:58:05 -0000 1.3
+++ gcc.dg/20020430-1.c 16 Oct 2005 00:26:17 -0000
@@ -4,7 +4,7 @@
until the last moment. After which we did not delete dead code,
which left a reference to the deleted ADDR_VEC. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -frename-registers -fpic" } */
typedef unsigned long XID;
Index: gcc.dg/20021018-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20021018-1.c,v
retrieving revision 1.4
diff -u -p -r1.4 20021018-1.c
--- gcc.dg/20021018-1.c 3 Sep 2004 18:09:33 -0000 1.4
+++ gcc.dg/20021018-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target fpic } } */
/* { dg-options "-O2 -fpic" } */
/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
Index: gcc.dg/20021023-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20021023-1.c,v
retrieving revision 1.1
diff -u -p -r1.1 20021023-1.c
--- gcc.dg/20021023-1.c 23 Oct 2002 21:20:08 -0000 1.1
+++ gcc.dg/20021023-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,6 +1,6 @@
/* This testcase ICEd on x86-64 because LABEL_REF + small const was not
considered as local_symbolic_operand. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
typedef __builtin_va_list va_list;
Index: gcc.dg/20021029-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20021029-1.c,v
retrieving revision 1.3
diff -u -p -r1.3 20021029-1.c
--- gcc.dg/20021029-1.c 9 May 2005 17:42:55 -0000 1.3
+++ gcc.dg/20021029-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,6 +1,6 @@
/* Test whether difference of local labels doesn't force
variables into writable sections. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
/* { dg-options "-O2 -fpic -mpt-fixed" { target sh64*-*-* } } */
/* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
Index: gcc.dg/20021116-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20021116-1.c,v
retrieving revision 1.2
diff -u -p -r1.2 20021116-1.c
--- gcc.dg/20021116-1.c 16 Nov 2002 20:04:40 -0000 1.2
+++ gcc.dg/20021116-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,6 +1,5 @@
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
void **
foo (void **x, int y, void *z)
Index: gcc.dg/20030120-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20030120-1.c,v
retrieving revision 1.1
diff -u -p -r1.1 20030120-1.c
--- gcc.dg/20030120-1.c 21 Jan 2003 07:37:13 -0000 1.1
+++ gcc.dg/20030120-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,7 +1,6 @@
/* PR 7154 */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O -fpic" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* mmix-*-* } 0 } */
const int x[1]={ 1 };
void foo(int i, int *p)
Index: gcc.dg/20030213-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20030213-1.c,v
retrieving revision 1.3
diff -u -p -r1.3 20030213-1.c
--- gcc.dg/20030213-1.c 3 Sep 2004 18:09:33 -0000 1.3
+++ gcc.dg/20030213-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,7 +1,6 @@
/* Testcase for http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01017.html */
-/* { dg-do link } */
+/* { dg-do link { target fpic } } */
/* { dg-options "-O -fpic" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
int *g;
Index: gcc.dg/20030225-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20030225-1.c,v
retrieving revision 1.3
diff -u -p -r1.3 20030225-1.c
--- gcc.dg/20030225-1.c 3 Sep 2004 18:09:33 -0000 1.3
+++ gcc.dg/20030225-1.c 16 Oct 2005 00:26:18 -0000
@@ -3,9 +3,8 @@
fixed register.
Distilled from the xvid sources by Guillaume Morin <guillaume@morinfr.org>
and Benjamin Herrenschmidt <benh@kernel.crashing.org>. */
-/* { dg-do run } */
+/* { dg-do run { target fpic } } */
/* { dg-options "-O2 -fPIC" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* mmix-*-* } 0 } */
/* { 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);
Index: gcc.dg/20030702-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20030702-1.c,v
retrieving revision 1.2
diff -u -p -r1.2 20030702-1.c
--- gcc.dg/20030702-1.c 31 Mar 2005 18:14:10 -0000 1.2
+++ gcc.dg/20030702-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,6 +1,6 @@
/* This tests whether REG_ALWAYS_RETURN notes are handled
correctly in combine. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic -fprofile-arcs" } */
void test (void)
Index: gcc.dg/20030708-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20030708-1.c,v
retrieving revision 1.2
diff -u -p -r1.2 20030708-1.c
--- gcc.dg/20030708-1.c 3 Sep 2004 18:09:33 -0000 1.2
+++ gcc.dg/20030708-1.c 16 Oct 2005 00:26:18 -0000
@@ -1,5 +1,5 @@
/* PR c/11420 */
-/* { dg-do link } */
+/* { dg-do link { target fpic } } */
/* { dg-options "-O2 -fpic" } */
/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
Index: gcc.dg/20040311-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20040311-2.c,v
retrieving revision 1.1
diff -u -p -r1.1 20040311-2.c
--- gcc.dg/20040311-2.c 13 Mar 2004 11:22:26 -0000 1.1
+++ gcc.dg/20040311-2.c 16 Oct 2005 00:26:18 -0000
@@ -1,5 +1,5 @@
/* PR target/14533 */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
void bar (char *, int);
Index: gcc.dg/inline-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/inline-2.c,v
retrieving revision 1.5
diff -u -p -r1.5 inline-2.c
--- gcc.dg/inline-2.c 20 Oct 2003 21:46:55 -0000 1.5
+++ gcc.dg/inline-2.c 16 Oct 2005 00:26:21 -0000
@@ -1,8 +1,7 @@
/* Ensure that we continue to consider FOO local, even though
it has been deferred. */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-options "-O3 -finline-limit=0 -fpic" } */
-/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
static int foo(void)
{
brgds, H-P