| 1 |
/* { dg-do "compile" } */ |
| 2 |
|
| 3 |
void __attribute__ ((target("branch-protection=leaf"))) |
| 4 |
foo1 () |
| 5 |
{ |
| 6 |
} |
| 7 |
/* { dg-error {invalid argument 'leaf' for 'target\("branch-protection="\)'} "" { target *-*-* } 5 } */ |
| 8 |
/* { dg-error {pragma or attribute 'target\("branch-protection=leaf"\)' is not valid} "" { target *-*-* } 5 } */ |
| 9 |
|
| 10 |
void __attribute__ ((target("branch-protection=none+pac-ret"))) |
| 11 |
foo2 () |
| 12 |
{ |
| 13 |
} |
| 14 |
/* { dg-error {argument 'none' can only appear alone in 'target\("branch-protection="\)'} "" { target *-*-* } 12 } */ |
| 15 |
/* { dg-error {pragma or attribute 'target\("branch-protection=none\+pac-ret"\)' is not valid} "" { target *-*-* } 12 } */ |
| 16 |
|
| 17 |
void __attribute__ ((target("branch-protection="))) |
| 18 |
foo3 () |
| 19 |
{ |
| 20 |
} |
| 21 |
/* { dg-error {missing feature or flag for 'target\("branch-protection="\)'} "" { target *-*-* } 19 } */ |
| 22 |
/* { dg-error {pragma or attribute 'target\("branch-protection="\)' is not valid} "" { target *-*-* } 19 } */ |