[testsuite,committed] require fpic effective target for tests with -fpic

Message ID 22be124c-87d6-0ef4-5c55-458aec963d55@codesourcery.com
State New
Headers show
Series
  • [testsuite,committed] require fpic effective target for tests with -fpic
Related show

Commit Message

Sandra Loosemore Jan. 22, 2019, 6:41 p.m.
On nios2, PIC relocations are defined only for the GNU/Linux ABI, so 
nios2-elf gives a "sorry" with -fpic.  That was causing some failures in 
some new testcases explicitly passing -fpic or -fPIC in dg-options. 
I've fixed these tests by adding dg-require-effective-target fpic, which 
is how I've handled this problem in the past.

-Sandra

Patch

Index: gcc/testsuite/g++.dg/lto/pr87906_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/pr87906_0.C	(revision 268160)
+++ gcc/testsuite/g++.dg/lto/pr87906_0.C	(working copy)
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options { { -O -fPIC -flto } } }
 // { dg-extra-ld-options "-shared -nostdlib" }
 
Index: gcc/testsuite/g++.dg/vec-init-1.C
===================================================================
--- gcc/testsuite/g++.dg/vec-init-1.C	(revision 268160)
+++ gcc/testsuite/g++.dg/vec-init-1.C	(working copy)
@@ -2,6 +2,7 @@ 
    parallel of two symbol_refs.  */
 
 /* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O3 -fPIC" } */
 
 
Index: gcc/testsuite/gcc.dg/pr87793.c
===================================================================
--- gcc/testsuite/gcc.dg/pr87793.c	(revision 268160)
+++ gcc/testsuite/gcc.dg/pr87793.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fpic -Os -g" } */
+/* { dg-require-effective-target fpic } */
 
 struct fit_loadable_tbl {
 	int type;