Patchwork Fix g++.dg/cpp0x/constexpr-rom.C failure

login
register
mail settings
Submitter Andreas Schwab
Date Jan. 27, 2012, 7:47 p.m.
Message ID <m2d3a5szah.fsf@igel.home>
Download mbox | patch
Permalink /patch/138281/
State New
Headers show

Comments

Andreas Schwab - Jan. 27, 2012, 7:47 p.m.
Ok, the option is only recognized when it is mentioned in the specs, and
neither darwin nor aix configurations have %{G*} in their CC1_SPEC, same
for osf or vms on alpha.  Checked in the following as obvious.

Andreas.

2012-01-27  Andreas Schwab  <schwab@linux-m68k.org>

	* g++.dg/cpp0x/constexpr-rom.C: Don't add -G0 on *-*-darwin*
	*-*-aix* alpha*-*-osf* alpha*-*-*vms*.
Mike Stump - Jan. 31, 2012, 6:47 p.m.
On Jan 27, 2012, at 11:47 AM, Andreas Schwab wrote:
> Ok, the option is only recognized when it is mentioned in the specs, and
> neither darwin nor aix configurations have %{G*} in their CC1_SPEC, same
> for osf or vms on alpha.  Checked in the following as obvious.

Thanks.

Patch

diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
index 636f0e7..5213d59 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
@@ -1,6 +1,6 @@ 
 // PR c++/49673: check that test_data goes into .rodata
 // { dg-options -std=c++0x }
-// { dg-additional-options -G0 { target alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* powerpc*-*-* rs6000*-*-* score*-*-* } }
+// { dg-additional-options -G0 { target { { alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* powerpc*-*-* rs6000*-*-* score*-*-* } && { ! { *-*-darwin* *-*-aix* alpha*-*-osf* alpha*-*-*vms* } } } } }
 // { dg-final { scan-assembler "\\.rdata" { target mips*-*-* } } }
 // { dg-final { scan-assembler "rodata" { target { { *-*-linux-gnu || *-*-elf } && { ! mips*-*-* } } } } }