This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testsuite, committed] Fix pr49718.C for MIPS PIC
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 01 Feb 2014 10:41:45 +0000
- Subject: [testsuite, committed] Fix pr49718.C for MIPS PIC
- Authentication-results: sourceware.org; auth=none
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.
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))