]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/attr-used-7.c
Switch to a new section if the SECTION_RETAIN bit doesn't match
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / attr-used-7.c
1 /* { dg-do compile } */
2 /* { dg-options "-Wall -O2" } */
3
4 int __attribute__((used,section(".data.foo"))) foo2 = 2;
5 int __attribute__((section(".data.foo"))) foo1 = 1;
6
7 /* { dg-final { scan-assembler ".data.foo,\"aw\"" { target R_flag_in_section } } } */
8 /* { dg-final { scan-assembler ".data.foo,\"awR\"" { target R_flag_in_section } } } */