aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/attr-used-7.c
blob: 9c9862fcafd98c41475ab80a58d70487d833fd86 (plain)
1
2
3
4
5
6
7
8
9
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
/* { dg-options "-Wall -O2" } */

int __attribute__((used,section(".data.foo"))) foo2 = 2;
int __attribute__((section(".data.foo"))) foo1 = 1;

/* { dg-final { scan-assembler ".data.foo,\"aw\"" { target R_flag_in_section } } } */
/* { dg-final { scan-assembler-not ".data.foo,\"awR\"" { target R_flag_in_section } } } */