This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


This patch makes some PIC tests say that they require an fpic target.
Tested on i586-wrs-vxworks (which can handle PIC for RTP multilibs
but not for kernel multilibs).  Applied as obvious.

Richard


gcc/testsuite/
	* gcc.c-torture/compile/981006-1.c: Use the non-PIC options if
	PIC is not supported.
	* gcc.dg/20020103-1.c: Add dg-require-effective-target fpic.
	* gcc.dg/20020426-2.c: Likewise.
	* gcc.dg/pr28243.c: Likewise.
	* gcc.dg/visibility-11.c: Likewise.
	* gcc.dg/tls/opt-9.c: Likewise.
	* gcc.dg/tls/opt-10.c: Likewise.
	* gcc.dg/tls/pic-1.c: Likewise.
	* gcc.dg/tls/struct-1.c: Likewise.
	* gcc.target/i386/20000807-1.c: Likewise.
	* gcc.target/i386/20000904-1.c: Likewise.
	* gcc.target/i386/20011119-1.c: Likewise.
	* gcc.target/i386/990213-2.c: Likewise.
	* gcc.target/i386/990214-1.c: Likewise.
	* gcc.target/i386/compress-float-387-pic.c: Likewise.
	* gcc.target/i386/compress-float-sse-pic.c: Likewise.
	* gcc.target/i386/pic-1.c: Likewise.
	* gcc.target/i386/pr21518.c: Likewise.
	* gcc.target/i386/pr23098.c: Likewise.
	* gcc.target/i386/pr23943.c: Likewise.

Index: gcc/testsuite/gcc.c-torture/compile/981006-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/981006-1.c	(revision 122834)
+++ gcc/testsuite/gcc.c-torture/compile/981006-1.c	(working copy)
@@ -6,7 +6,7 @@
 /* { dg-do assemble } */
 /* For MIPS at least, pic is needed to trigger the problem. */
 /* { dg-options "-w -Wuninitialized -Werror -fpic" } */
-/* { dg-options "-w -Wuninitialized -Werror" { target rs6000-*-aix* powerpc*-*-aix* arm*-*-* xscale*-*-* strongarm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* cris-*-elf* cris-*-aout* mmix-*-* } } */
+/* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* xscale*-*-* strongarm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* cris-*-elf* cris-*-aout* mmix-*-* } || { ! fpic } } } } */
 
 int foo (int a, int b)
 {
Index: gcc/testsuite/gcc.dg/20020103-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20020103-1.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/20020103-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* Verify that constant equivalences get reloaded properly, either by being
    spilled to the stack, or regenerated, but not dropped to memory.  */
 /* { dg-do compile { target { { i?86-*-* rs6000-*-* alpha*-*-* x86_64-*-* } || { powerpc*-*-* && ilp32 } } } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -fpic -fno-omit-frame-pointer -fno-asynchronous-unwind-tables" } */
 /* { dg-final { scan-assembler-not "LC\[0-9\]" { xfail powerpc*-*-* } } } */
 
Index: gcc/testsuite/gcc.dg/20020426-2.c
===================================================================
--- gcc/testsuite/gcc.dg/20020426-2.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/20020426-2.c	(working copy)
@@ -3,6 +3,7 @@
 /* { 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-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/testsuite/gcc.dg/pr28243.c
===================================================================
--- gcc/testsuite/gcc.dg/pr28243.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/pr28243.c	(working copy)
@@ -2,6 +2,7 @@
 /* Reported by Mike Frysinger <vapier@gentoo.org> */
 
 /* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -ftracer -fPIC" } */
 
 struct displayfuncs {
Index: gcc/testsuite/gcc.dg/visibility-11.c
===================================================================
--- gcc/testsuite/gcc.dg/visibility-11.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/visibility-11.c	(working copy)
@@ -5,6 +5,7 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
 /* { dg-require-visibility "" } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-Os -fpic -mstringop-strategy=libcall" } */
 /* { dg-final { scan-assembler "memcpy@PLT" } } */
 
Index: gcc/testsuite/gcc.dg/tls/opt-9.c
===================================================================
--- gcc/testsuite/gcc.dg/tls/opt-9.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/tls/opt-9.c	(working copy)
@@ -1,5 +1,6 @@
 /* PR 21412 */
 /* { dg-do compile */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -fPIC" } */
 
 struct S { int x[10]; };
Index: gcc/testsuite/gcc.dg/tls/opt-10.c
===================================================================
--- gcc/testsuite/gcc.dg/tls/opt-10.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/tls/opt-10.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O3 -fpic" } */
 
 /* The web pass was creating unrecognisable pic_load_dot_plus_four insns
Index: gcc/testsuite/gcc.dg/tls/pic-1.c
===================================================================
--- gcc/testsuite/gcc.dg/tls/pic-1.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/tls/pic-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -fpic -ftls-model=global-dynamic" } */
 
 extern __thread long e1;
Index: gcc/testsuite/gcc.dg/tls/struct-1.c
===================================================================
--- gcc/testsuite/gcc.dg/tls/struct-1.c	(revision 122834)
+++ gcc/testsuite/gcc.dg/tls/struct-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* This testcase ICEd on IA-32 because the backend was inconsistent whether
    to allow addends for @dtpoff relocs or not.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -fpic" } */
 
 struct S {
Index: gcc/testsuite/gcc.target/i386/20000807-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/20000807-1.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/20000807-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-Os -fpic" } */
 
 #include <string.h>
Index: gcc/testsuite/gcc.target/i386/20000904-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/20000904-1.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/20000904-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O0 -fpic" } */
 
 static struct {
Index: gcc/testsuite/gcc.target/i386/20011119-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/20011119-1.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/20011119-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* Test for reload failing to eliminate from argp to sp.  */
 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
 /* { dg-skip-if "" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
 /* { dg-skip-if "PIC default" { "*-*-darwin*" } { "*" } { "" } } */
 /* { dg-options "-O2 -fomit-frame-pointer" } */
Index: gcc/testsuite/gcc.target/i386/990213-2.c
===================================================================
--- gcc/testsuite/gcc.target/i386/990213-2.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/990213-2.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-fPIC" } */
 
 struct normal_encoding {};
Index: gcc/testsuite/gcc.target/i386/990214-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/990214-1.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/990214-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-fPIC" } */
 
 typedef int int64_t __attribute__ ((__mode__ (  __DI__ ))) ;
Index: gcc/testsuite/gcc.target/i386/compress-float-387-pic.c
===================================================================
--- gcc/testsuite/gcc.target/i386/compress-float-387-pic.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/compress-float-387-pic.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target i?86*-*-* } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -march=pentium4 -mtune=prescott -mfpmath=387 -fpic" } */
 double foo (double x) {
   return x + 1.75;
Index: gcc/testsuite/gcc.target/i386/compress-float-sse-pic.c
===================================================================
--- gcc/testsuite/gcc.target/i386/compress-float-sse-pic.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/compress-float-sse-pic.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target i?86*-*-* } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -march=pentium4 -mtune=prescott -mfpmath=sse -fpic" } */
 double foo (double x) {
   return x + 1.75;
Index: gcc/testsuite/gcc.target/i386/pic-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/pic-1.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/pic-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR target/8340 */
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-fPIC" } */
 
 int foo ()
Index: gcc/testsuite/gcc.target/i386/pr21518.c
===================================================================
--- gcc/testsuite/gcc.target/i386/pr21518.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/pr21518.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fPIC -fno-tree-pre" } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
 
 extern void __attribute__ ((regparm (3)))
 drawPointsLines (char type, int first, int *dd);
Index: gcc/testsuite/gcc.target/i386/pr23098.c
===================================================================
--- gcc/testsuite/gcc.target/i386/pr23098.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/pr23098.c	(working copy)
@@ -3,6 +3,7 @@
 /* { dg-options "-O2 -fPIC" } */
 /* { dg-final { scan-assembler-not "\.LC\[0-9\]" } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
 
 double foo (float);
 
Index: gcc/testsuite/gcc.target/i386/pr23943.c
===================================================================
--- gcc/testsuite/gcc.target/i386/pr23943.c	(revision 122834)
+++ gcc/testsuite/gcc.target/i386/pr23943.c	(working copy)
@@ -1,6 +1,7 @@
 /* This used to ICE in side_effects_p, due to a problem in cse.c.
    Origin: marcus at jet dot franken dot de.  */
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -fPIC" } */
 
 typedef long unsigned int size_t;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]