Patchwork [committed] Fix constexpr-rom.C for MIPS

login
register
mail settings
Submitter Richard Sandiford
Date Jan. 2, 2012, 11:03 a.m.
Message ID <87zke6tlha.fsf@firetop.home>
Download mbox | patch
Permalink /patch/133811/
State New
Headers show

Comments

Richard Sandiford - Jan. 2, 2012, 11:03 a.m.
MIPS uses an .rdata pseudo-op rather than an .rodata section for
read-only data.  Tested on mips64-linux-gnu and applied.

I'm tempted to remove this bit of historical baggage now that we
require fairly recent binutils, but that's for another day.

Richard


gcc/testsuite/
	* g++.dg/cpp0x/constexpr-rom.C: Look for .rdata rather than rodata
	for MIPS.

Patch

Index: gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
===================================================================
--- gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C	2011-12-31 11:19:16.000000000 +0000
+++ gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C	2011-12-31 12:31:44.000000000 +0000
@@ -1,6 +1,7 @@ 
 // PR c++/49673: check that test_data goes into .rodata
 // { dg-options -std=c++0x }
-// { dg-final { scan-assembler "rodata" { target { *-*-linux-gnu || *-*-elf } } } }
+// { dg-final { scan-assembler "\\.rdata" { target mips*-*-* } } }
+// { dg-final { scan-assembler "rodata" { target { { *-*-linux-gnu || *-*-elf } && { ! mips*-*-* } } } } }
 
 struct Data
 {