diff mbox

[MIPS,committed] XFAIL gcc.dg/pr48774.c for MIPS REL targets

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

Commit Message

Richard Sandiford Feb. 5, 2012, 2:56 p.m. UTC
gcc.dg/pr48774.c fails on MIPS REL targets because of an orphaned
HI16 relocation; see PR 52125 for details.  This isn't a regression,
so I'm just going to XFAIL it for now.

Tested on mips64-linux-gnu and various *-elf targets.  Applied.

Richard


gcc/testsuite/
	PR target/52125
	* lib/target-supports.exp (check_effective_target_mips_rel): New.
	* gcc.dg/pr48774.c: Skip on MIPS REL targets.
diff mbox

Patch

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	2012-02-05 14:53:05.000000000 +0000
+++ gcc/testsuite/lib/target-supports.exp	2012-02-05 14:53:19.000000000 +0000
@@ -910,6 +910,20 @@  proc check_effective_target_mips_llsc {
     }]
 }
 
+# Return true if the target is a MIPS target that uses in-place relocations.
+
+proc check_effective_target_mips_rel { } {
+    if { ![istarget mips*-*-*] } {
+	return 0
+    }
+    return [check_no_compiler_messages mips_rel object {
+	#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) \
+	    || (defined _ABI64 && _MIPS_SIM == _ABI64)
+	#error FOO
+	#endif
+    }]
+}
+
 # Return 1 if the current multilib does not generate PIC by default.
 
 proc check_effective_target_nonpic { } {
Index: gcc/testsuite/gcc.dg/pr48774.c
===================================================================
--- gcc/testsuite/gcc.dg/pr48774.c	2012-02-05 14:30:22.000000000 +0000
+++ gcc/testsuite/gcc.dg/pr48774.c	2012-02-05 14:53:46.000000000 +0000
@@ -1,5 +1,6 @@ 
 /* PR target/48774 */
 /* { dg-do run } */
+/* { dg-skip-if "PR 52125" { mips_rel } { "*" } { "" } } */
 /* { dg-options "-O2 -funroll-loops" } */
 
 extern void abort (void);