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

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

Comments

Andreas Schwab - Jan. 14, 2012, 7:57 p.m.
Fix spurious failure by disabling use of sdata.  Tested on
powerpc-linux.

Andreas.

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

	* g++.dg/cpp0x/constexpr-rom.C: Add -G0 where applicable.
Jakub Jelinek - Jan. 14, 2012, 8:04 p.m.
On Sat, Jan 14, 2012 at 08:57:00PM +0100, Andreas Schwab wrote:
> Fix spurious failure by disabling use of sdata.  Tested on
> powerpc-linux.

Please use dg-additional-options instead.

> 2012-01-14  Andreas Schwab <schwab@linux-m68k.org>
> 
> 	* g++.dg/cpp0x/constexpr-rom.C: Add -G0 where applicable.
> 
> diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
> index aa9ff5d..5853ea1 100644
> --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
> +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
> @@ -1,5 +1,6 @@
>  // PR c++/49673: check that test_data goes into .rodata
>  // { dg-options -std=c++0x }
> +// { dg-options "-std=c++0x -G0" { target alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* powerpc*-*-* rs6000*-*-* score*-*-* } }
>  // { dg-final { scan-assembler "\\.rdata" { target mips*-*-* } } }
>  // { dg-final { scan-assembler "rodata" { target { { *-*-linux-gnu || *-*-elf } && { ! mips*-*-* } } } } }

	Jakub

Patch

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