Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-rom.C
blobc74cdd74a205fe6b27ed312cb5e6246603a68862
1 // PR c++/49673: check that test_data goes into .rodata
2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options -G0 { target { { alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* loongarch*-*-* powerpc*-*-* rs6000*-*-* } && { ! { *-*-darwin* *-*-aix* alpha*-*-*vms* } } } } }
4 // { dg-final { scan-assembler "\\.rdata" { target mips*-*-* } } }
5 // { dg-final { scan-assembler "rodata" { target { { *-*-linux-gnu *-*-gnu* *-*-elf } && { ! { mips*-*-* riscv*-*-* } } } } } }
7 struct Data
9   int i;
10   constexpr Data(int i = 0) : i(i+1) {}
13 extern const Data test_data = { 1 };