LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / fdata-sections-2.c
blobdda90ba7cc34a79bfdee78802a2c30671ec50fd1
1 /* PR middle-end/192 */
2 /* PR middle-end/54303 */
4 /* This checks that string constants are put in per-function rodata
5 sections, so that they can be garbage collected. */
7 /* { dg-do compile { target *-*-linux* } } */
8 /* { dg-options "-O -ffunction-sections -fdata-sections" } */
10 const char *f1(void) { return "falderalde"; }
11 const char *f2(void) { return "a"; }
12 const char *f3(void) { return "falderalde"; }
13 const char *f4(void) { return "eralde"; }
15 /* { dg-final { scan-assembler {\.rodata\.f1\.str} } } */
16 /* { dg-final { scan-assembler {\.rodata\.f2\.str} } } */
17 /* { dg-final { scan-assembler-not {\.rodata\.f3\.str} } } */
18 /* { dg-final { scan-assembler {\.rodata\.f4\.str} } } */