g++.dg/opt/devirt2.C was failing for mips64-linux-gnu because each call to xyzzy was accompanied by a R_MIPS_JALR .reloc statement that also mentioned xyzzy.
This wouldn't happen if the compiler was built to use PLTs by default, so rather than look for 4 copies of xyzzy, it seemed better to add -mno-abicalls. Tested on mips64-linux-gnu and applied. Richard gcc/testsuite/ * g++.dg/opt/devirt2.C: Add -mno-abicalls for MIPS. Index: gcc/testsuite/g++.dg/opt/devirt2.C =================================================================== --- gcc/testsuite/g++.dg/opt/devirt2.C 2011-12-30 17:39:32.000000000 +0000 +++ gcc/testsuite/g++.dg/opt/devirt2.C 2011-12-30 17:42:30.000000000 +0000 @@ -3,6 +3,8 @@ /* Using -mshort-calls avoids loading the function addresses in registers and thus getting the counts wrong. */ // { dg-additional-options "-mshort-calls" {target epiphany-*-*} } +// Using -mno-abicalls avoids a R_MIPS_JALR .reloc. +// { dg-additional-options "-mno-abicalls" { target mips*-*-* } } // { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { alpha*-*-* hppa*-*-* ia64*-*-hpux* sparc*-*-* } } } } } // The IA64 and HPPA compilers generate external declarations in addition // to the call so those scans need to be more specific.