1 /* PR middle-end/192 */
2 /* PR middle-end/54303 */
3 
4 /* This checks that string constants are put in per-function rodata
5    sections, so that they can be garbage collected.  */
6 
7 /* { dg-do compile { target *-*-linux* *-*-uclinux* } } */
8 /* { dg-options "-O -ffunction-sections -fdata-sections" } */
9 
f1(void)10 const char *f1(void) { return "falderalde"; }
f2(void)11 const char *f2(void) { return "a"; }
f3(void)12 const char *f3(void) { return "falderalde"; }
f4(void)13 const char *f4(void) { return "eralde"; }
14 
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} } } */
19