diff options
Diffstat (limited to 'test/Sema/arm-interrupt-attr.c')
-rw-r--r-- | test/Sema/arm-interrupt-attr.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Sema/arm-interrupt-attr.c b/test/Sema/arm-interrupt-attr.c index b9684f0b46c1..3a6cdbe0e072 100644 --- a/test/Sema/arm-interrupt-attr.c +++ b/test/Sema/arm-interrupt-attr.c @@ -17,3 +17,19 @@ __attribute__((interrupt("UNDEF"))) void foo7() {} __attribute__((interrupt)) void foo8() {} __attribute__((interrupt())) void foo9() {} __attribute__((interrupt(""))) void foo10() {} + +void callee1(); +__attribute__((interrupt("IRQ"))) void callee2(); +void caller1() { + callee1(); + callee2(); +} +__attribute__((interrupt("IRQ"))) void caller2() { + callee1(); // expected-warning {{call to function without interrupt attribute could clobber interruptee's VFP registers}} + callee2(); +} + +void (*callee3)(); +__attribute__((interrupt("IRQ"))) void caller3() { + callee3(); // expected-warning {{call to function without interrupt attribute could clobber interruptee's VFP registers}} +} |