]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.target/arm/cmse/cmse-9.c
ARMv8-M Security Extension's cmse_nonsecure_call: use __gnu_cmse_nonsecure_call
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / arm / cmse / cmse-9.c
CommitLineData
9ad1f699
AV
1/* { dg-do compile } */
2/* { dg-skip-if "Testing exclusion of -mcmse" { arm-*-* } { "-mcmse" } { "" } } */
3
4
c92e08e3
AV
5void __attribute__ ((cmse_nonsecure_call)) (*bar) (int); /* { dg-warning "attribute ignored without -mcmse option" } */
6typedef void __attribute__ ((cmse_nonsecure_call)) baz (int); /* { dg-warning "attribute ignored without -mcmse option" } */
7
9ad1f699 8int __attribute__ ((cmse_nonsecure_entry))
c92e08e3 9foo (int a, baz b)
9ad1f699 10{ /* { dg-warning "attribute ignored without -mcmse option" } */
c92e08e3
AV
11 bar (a);
12 b (a);
9ad1f699
AV
13 return a + 1;
14}
15
c92e08e3
AV
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" } } */
9ad1f699
AV
19/* { dg-final { scan-assembler "foo:" } } */
20/* { dg-final { scan-assembler-not "__acle_se_foo:" } } */