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
2019-01-22 Sandra Loosemore <san...@codesourcery.com>
gcc/testsuite/
* g++.dg/lto/pr87906_0.C: Add dg-require-effective-target fpic.
* g++.dg/vec-init-1.C: Likewise.
* gcc.dg/pr87793.c: Likewise.
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;