Patchwork [testsuite,committed] Fix pr49718.C for MIPS PIC

login
register
mail settings
Submitter Richard Sandiford
Date Feb. 1, 2014, 10:41 a.m.
Message ID <87ppn79kt2.fsf@talisman.default>
Download mbox | patch
Permalink /patch/315898/
State New
Headers show

Comments

Richard Sandiford - Feb. 1, 2014, 10:41 a.m.
Similar to Alpha, g++.dg/pr49718.C would fail for MIPS PIC because
each called function is mentioned twice, once in the GOT reference
and once in the R_MIPS_JALR reloc used for relaxing jumps to branches.

Tested on mips64-linux-gnu and applied.

Thanks,
Richard


gcc/testsuite/
	* g++.dg/pr49718.C: Use -mno-relax-pic-calls for MIPS.

Patch

Index: gcc/testsuite/g++.dg/pr49718.C
===================================================================
--- gcc/testsuite/g++.dg/pr49718.C	2014-01-20 21:21:09.695678105 +0000
+++ gcc/testsuite/g++.dg/pr49718.C	2014-02-01 10:37:28.604846208 +0000
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -finstrument-functions" } */
 /* { dg-additional-options "-mno-explicit-relocs" { target alpha*-*-* } } */
+/* { dg-additional-options "-mno-relax-pic-calls" { target mips*-*-* } } */
 /* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1} } */
 
 #define NOINSTR __attribute__((no_instrument_function))