| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-skip-if "" { *-*-* } { "-mcpu=msp430" "-mlarge" "-mcode-region=*" "-mdata-region=*" } { "" } } */ |
| 3 |
/* { dg-final { scan-assembler ".section.*upper.data" } } */ |
| 4 |
/* { dg-final { scan-assembler ".section.*lower.data" } } */ |
| 5 |
/* { dg-final { scan-assembler ".section.*either.data" } } */ |
| 6 |
|
| 7 |
int __attribute__((upper)) upper_bss; /* { dg-warning "'upper' attribute ignored. Large memory model .'-mlarge'. is required" } */ |
| 8 |
int __attribute__((lower)) lower_bss; /* { dg-warning "'lower' attribute ignored. Large memory model .'-mlarge'. is required" } */ |
| 9 |
int __attribute__((either)) either_bss; /* { dg-warning "'either' attribute ignored. Large memory model .'-mlarge'. is required" } */ |
| 10 |
|
| 11 |
/* Verify that even without -mlarge, objects can still be placed in |
| 12 |
upper/lower/either regions manually. */ |
| 13 |
int __attribute__((section(".upper.data"))) upper_data = 1; |
| 14 |
int __attribute__((section(".lower.data"))) lower_data = 2; |
| 15 |
int __attribute__((section(".either.data"))) either_data = 3; |