From: Olivier Hainque Date: Tue, 3 Nov 2020 09:51:43 +0000 (+0000) Subject: Add dg-require-effective-target fpic to gcc i386 tests X-Git-Tag: upstream/12.2.0~12305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa23a2dd53f67f5cb4cbfa7038c2fc48caa82cc3;p=platform%2Fupstream%2Fgcc.git Add dg-require-effective-target fpic to gcc i386 tests This change adds /* { dg-require-effective-target fpic } */ to tests in gcc.target/i386 that do use -fpic or -fPIC but don't currently query the target support. This corresponds to what many other fpic tests do and helps the vxWorks ports at least, as -fpic is typically not supported in at least one of the two major modes of such port (kernel vs RTP). 2020-11-03 Olivier Hainque gcc/testsuite/ * gcc.target/i386/pr45352-1.c: Add dg-require-effective-target fpic. * gcc.target/i386/pr47602.c: Likewise. * gcc.target/i386/pr55151.c: Likewise. * gcc.target/i386/pr55458.c: Likewise. * gcc.target/i386/pr56348.c: Likewise. * gcc.target/i386/pr57097.c: Likewise. * gcc.target/i386/pr65753.c: Likewise. * gcc.target/i386/pr65915.c: Likewise. * gcc.target/i386/pr66232-5.c: Likewise. * gcc.target/i386/pr66334.c: Likewise. * gcc.target/i386/pr66819-2.c: Likewise. * gcc.target/i386/pr67265.c: Likewise. * gcc.target/i386/pr81481.c: Likewise. * gcc.target/i386/pr83994.c: Likewise. --- diff --git a/gcc/testsuite/gcc.target/i386/pr45352-1.c b/gcc/testsuite/gcc.target/i386/pr45352-1.c index 5cd1bd8..f5e96b2 100644 --- a/gcc/testsuite/gcc.target/i386/pr45352-1.c +++ b/gcc/testsuite/gcc.target/i386/pr45352-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-mtune=amdfam10 -O3 -fpeel-loops -fselective-scheduling2 -fsel-sched-pipelining -fPIC" } */ static int FIR_Tab_16[16][16]; diff --git a/gcc/testsuite/gcc.target/i386/pr47602.c b/gcc/testsuite/gcc.target/i386/pr47602.c index fa5f5bd..5ed1e1f 100644 --- a/gcc/testsuite/gcc.target/i386/pr47602.c +++ b/gcc/testsuite/gcc.target/i386/pr47602.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target ia32 } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-fPIC" } */ /* Test verifies that %ebx is no longer fixed when generating PIC code on i686. */ diff --git a/gcc/testsuite/gcc.target/i386/pr55151.c b/gcc/testsuite/gcc.target/i386/pr55151.c index 62da8cb..d6255a8 100644 --- a/gcc/testsuite/gcc.target/i386/pr55151.c +++ b/gcc/testsuite/gcc.target/i386/pr55151.c @@ -1,5 +1,6 @@ /* PR rtl-optimization/55151 */ /* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-fPIC" } */ int a, b, c, d, e, f, g, h, i, j, k, l; diff --git a/gcc/testsuite/gcc.target/i386/pr55458.c b/gcc/testsuite/gcc.target/i386/pr55458.c index 7164ca9..1dea55c 100644 --- a/gcc/testsuite/gcc.target/i386/pr55458.c +++ b/gcc/testsuite/gcc.target/i386/pr55458.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target ia32 } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-fPIC" } */ /* Test verifies that %ebx is no longer fixed when generating PIC code on i686. */ diff --git a/gcc/testsuite/gcc.target/i386/pr56348.c b/gcc/testsuite/gcc.target/i386/pr56348.c index c31814f..93423d9 100644 --- a/gcc/testsuite/gcc.target/i386/pr56348.c +++ b/gcc/testsuite/gcc.target/i386/pr56348.c @@ -1,5 +1,6 @@ /* PR target/56348 */ /* { dg-do compile { target ia32 } } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -fPIC -mfpmath=sse -msse2" } */ typedef unsigned int size_t; diff --git a/gcc/testsuite/gcc.target/i386/pr57097.c b/gcc/testsuite/gcc.target/i386/pr57097.c index 2f00938..debacbf 100644 --- a/gcc/testsuite/gcc.target/i386/pr57097.c +++ b/gcc/testsuite/gcc.target/i386/pr57097.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -fPIC" } */ extern double ad[], bd[], cd[], dd[]; extern long long all[], bll[], cll[], dll[]; diff --git a/gcc/testsuite/gcc.target/i386/pr65753.c b/gcc/testsuite/gcc.target/i386/pr65753.c index 562f54b..117d6ed 100644 --- a/gcc/testsuite/gcc.target/i386/pr65753.c +++ b/gcc/testsuite/gcc.target/i386/pr65753.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-fPIC -O2" } */ /* { dg-final { scan-assembler-not "call" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr65915.c b/gcc/testsuite/gcc.target/i386/pr65915.c index 990c5aa..6588de4 100644 --- a/gcc/testsuite/gcc.target/i386/pr65915.c +++ b/gcc/testsuite/gcc.target/i386/pr65915.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -mavx512f -fpic -mcmodel=medium" } */ /* { dg-require-effective-target avx512f } */ /* { dg-require-effective-target lp64 } */ diff --git a/gcc/testsuite/gcc.target/i386/pr66232-5.c b/gcc/testsuite/gcc.target/i386/pr66232-5.c index 87f9380..76705a5 100644 --- a/gcc/testsuite/gcc.target/i386/pr66232-5.c +++ b/gcc/testsuite/gcc.target/i386/pr66232-5.c @@ -1,5 +1,6 @@ /* { dg-do compile { target { ! ia32 } } } */ /* { dg-require-effective-target maybe_x32 } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -fpic -mx32" } */ extern void (*bar) (void); diff --git a/gcc/testsuite/gcc.target/i386/pr66334.c b/gcc/testsuite/gcc.target/i386/pr66334.c index 97dfecc..19c2396 100644 --- a/gcc/testsuite/gcc.target/i386/pr66334.c +++ b/gcc/testsuite/gcc.target/i386/pr66334.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target ia32 } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -fpic -fexceptions -fasynchronous-unwind-tables" } */ /* { dg-final { scan-assembler "movl\[ \\t\].+, %ebx" } } */ extern int foo (int); diff --git a/gcc/testsuite/gcc.target/i386/pr66819-2.c b/gcc/testsuite/gcc.target/i386/pr66819-2.c index 9de4f97..ad2a33e 100644 --- a/gcc/testsuite/gcc.target/i386/pr66819-2.c +++ b/gcc/testsuite/gcc.target/i386/pr66819-2.c @@ -1,4 +1,5 @@ /* { dg-do compile { target ia32 } } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-fPIC -O2 -mregparm=3" } */ /* { dg-final { scan-assembler-not "call" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr67265.c b/gcc/testsuite/gcc.target/i386/pr67265.c index 2671acc..1708d53 100644 --- a/gcc/testsuite/gcc.target/i386/pr67265.c +++ b/gcc/testsuite/gcc.target/i386/pr67265.c @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-require-stack-check "" } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O -fstack-check -fPIC" } */ int a, b, c, d, e; diff --git a/gcc/testsuite/gcc.target/i386/pr81481.c b/gcc/testsuite/gcc.target/i386/pr81481.c index a5b936f..49f7821 100644 --- a/gcc/testsuite/gcc.target/i386/pr81481.c +++ b/gcc/testsuite/gcc.target/i386/pr81481.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target ssse3 } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -fpic -mssse3" } */ /* { dg-final { scan-assembler-not "pshufb\[ \t\]\\(%esp\\)" } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/pr83994.c b/gcc/testsuite/gcc.target/i386/pr83994.c index dc0b7cb..1eb47e3 100644 --- a/gcc/testsuite/gcc.target/i386/pr83994.c +++ b/gcc/testsuite/gcc.target/i386/pr83994.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -march=i686 -fpic -fstack-clash-protection" } */ /* { dg-require-effective-target ia32 } */