g++.dg/other/anon5.C is expected to fail to link. On Linux/x86 with PIE, there are additional messages linker:
[hjl@gnu-tools-1 gcc]$ g++ -fPIE -pie /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/other/anon5.C /tmp/ccwg53fj.o: In function `f()': anon5.C:(.text+0x7): undefined reference to `(anonymous namespace)::c::t' /usr/local/bin/ld: /tmp/ccwg53fj.o: relocation R_X86_64_PC32 against undefined symbol `_ZN12_GLOBAL__N_11c1tE' can not be used when making a shared object; recompile with -fPIC /usr/local/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status [hjl@gnu-tools-1 gcc]$ This patch ignores additional messages on Linux/x86 with PIE. OK for trunk? Thanks. H.J. --- gcc/testsuite/g++.dg/other/anon5.C | 2 ++ 1 file changed, 2 insertions(+) 2015-01-11 H.J. Lu <hongjiu...@intel.com> * g++.dg/other/anon5.C: Ignore additional messages on Linux/x86 with PIE. diff --git a/gcc/testsuite/g++.dg/other/anon5.C b/gcc/testsuite/g++.dg/other/anon5.C index 81e9def..4e4cc44 100644 --- a/gcc/testsuite/g++.dg/other/anon5.C +++ b/gcc/testsuite/g++.dg/other/anon5.C @@ -3,6 +3,8 @@ // { dg-options "-g" } // Ignore additional message on powerpc-ibm-aix // { dg-prune-output "obtain more information" } */ +// Ignore additional messages on Linux/x86 with PIE +// { dg-prune-output "Bad value" } */ namespace { struct c -- 1.9.3