I noticed that g++.dg/ipa/pr64146.C was FAILing on nios2-elf because this target doesn't support -fpic; the ABI defines the PIC relocations for GNU/Linux only, so -fpic gives a "sorry" in the bare-metal toolchain.

From reading the PR, my understanding is that the bug is specific to PIC and the behavior being tested for in the testcase is also specific to PIC, so I think the attached patch to skip the test if PIC isn't supported qualifies as obvious, and I've checked it in.

-Sandra

2015-03-11  Sandra Loosemore  <san...@codesourcery.com>

	gcc/testsuite/
	* g++.dg/ipa/pr64146.C: Require fpic support.
Index: gcc/testsuite/g++.dg/ipa/pr64146.C
===================================================================
--- gcc/testsuite/g++.dg/ipa/pr64146.C	(revision 221276)
+++ gcc/testsuite/g++.dg/ipa/pr64146.C	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-alias "" } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-fpic -fdump-ipa-icf-details -fipa-icf"  } */
 
 extern "C" const char*

Reply via email to