Here are fixes for two x86-specific testcase that uses PIC
compile-time options without requiring fpic.

Regstrapped on x86_64-linux-gnu.  Also tested with ppc-vx7r2,
ppc64-vx7r2, arm-vx7r2, aarch64-vx7r2, x86_64-vx7r2, and x86-vx7r2.  Ok
to install?


for  gcc/testsuite/ChangeLog

        * gcc.target/i386/pr115397.c: Require fpic.
        * gcc.target/i386/pr118497.c: Likewise.
---
 gcc/testsuite/gcc.target/i386/pr115397.c |    1 +
 gcc/testsuite/gcc.target/i386/pr118497.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/gcc/testsuite/gcc.target/i386/pr115397.c 
b/gcc/testsuite/gcc.target/i386/pr115397.c
index 27835782b78d8..26c6a2d4f4be3 100644
--- a/gcc/testsuite/gcc.target/i386/pr115397.c
+++ b/gcc/testsuite/gcc.target/i386/pr115397.c
@@ -1,4 +1,5 @@
 /* { dg-do compile { target ia32 } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-fPIC -mavx512f -O3" } */
 
 int LONG_divide_AVX512F_dimensions_0;
diff --git a/gcc/testsuite/gcc.target/i386/pr118497.c 
b/gcc/testsuite/gcc.target/i386/pr118497.c
index ef720931aa491..e44dffa7a9611 100644
--- a/gcc/testsuite/gcc.target/i386/pr118497.c
+++ b/gcc/testsuite/gcc.target/i386/pr118497.c
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { ia32 } } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -fpic" } */
 extern void crosscall2 (void (*fn) (void *, int), void *, int);
 extern void _cgo_panic (void *, int);

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to