| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-skip-if "Testing exclusion of -mcmse" { arm-*-* } { "-mcmse" } { "" } } */ |
| 3 |
|
| 4 |
|
| 5 |
void __attribute__ ((cmse_nonsecure_call)) (*bar) (int); /* { dg-warning "attribute ignored without '-mcmse' option" } */ |
| 6 |
typedef void __attribute__ ((cmse_nonsecure_call)) baz (int); /* { dg-warning "attribute ignored without '-mcmse' option" } */ |
| 7 |
|
| 8 |
int __attribute__ ((cmse_nonsecure_entry)) |
| 9 |
foo (int a, baz b) |
| 10 |
{ /* { dg-warning "attribute ignored without '-mcmse' option" } */ |
| 11 |
bar (a); |
| 12 |
b (a); |
| 13 |
return a + 1; |
| 14 |
} |
| 15 |
|
| 16 |
/* { dg-final { scan-assembler-not "bxns" } } */ |
| 17 |
/* { dg-final { scan-assembler-not "blxns" } } */ |
| 18 |
/* { dg-final { scan-assembler-not "bl\t__gnu_cmse_nonsecure_call" } } */ |
| 19 |
/* { dg-final { scan-assembler "foo:" } } */ |
| 20 |
/* { dg-final { scan-assembler-not "__acle_se_foo:" } } */ |