diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /test/Sema/arm-interrupt-attr.c | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Notes
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}} +} |