1 // RUN: %clang_cc1 -triple thumbv7m -verify -fsyntax-only %s
2
3 __attribute__((target("branch-protection=foo"))) // expected-error {{invalid or misplaced branch protection specification 'foo'}}
4 void
badvalue0(void)5 badvalue0(void) {}
6
7 __attribute__((target("branch-protection=+bti"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
8 void
badvalue1(void)9 badvalue1(void) {}
10
11 __attribute__((target("branch-protection=bti+"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
12 void
badvalue2(void)13 badvalue2(void) {}
14
15 __attribute__((target("branch-protection=pac-ret+bkey"))) // expected-error {{invalid or misplaced branch protection specification 'bkey'}}
16 void
badvalue3(void)17 badvalue3(void) {}
18
19 __attribute__((target("branch-protection=pac-ret+b-key"))) // expected-warning {{unsupported branch protection specification 'b-key'}}
20 void
badvalue4(void)21 badvalue4(void) {}
22
23 __attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
24 void
badoption0(void)25 badoption0(void) {}
26
27 __attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
28 void
badorder0(void)29 badorder0(void) {}
30
31 __attribute__((target("branch-protection=pac-ret+bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
32 void
badorder1(void)33 badorder1(void) {}
34