Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / attr-retain-7.c
blobc56d18a88e0dad2d42a47b9a764dd1cb4471932e
1 /* { dg-do compile { target R_flag_in_section } } */
2 /* { dg-skip-if "non-ELF target" { *-*-darwin* powerpc*-*-aix* } } */
3 /* { dg-options "-Wall -O2" } */
5 int __attribute__((used,retain,section(".data.foo"))) foo2 = 2;
6 int __attribute__((section(".data.foo"))) foo1 = 1;
7 /* { dg-warning "'.*' without 'retain' attribute and '.*' with 'retain' attribute are placed in a section with the same name" "" { target R_flag_in_section } .-1 } */
9 /* { dg-final { scan-assembler ".data.foo,\"aw\"" { target R_flag_in_section } } } */
10 /* { dg-final { scan-assembler ".data.foo,\"awR\"" { target R_flag_in_section } } } */