diff mbox

[committed] Fix g++.dg/opt/devirt2.C for mips*-linux-gnu

Message ID 87boqmv0bt.fsf@firetop.home
State New
Headers show

Commit Message

Richard Sandiford Jan. 2, 2012, 10:57 a.m. UTC
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.
diff mbox

Patch

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.