RISC-V: Error if function declared with different interrupt modes.
[official-gcc.git] / gcc / testsuite / gcc.target / riscv / interrupt-conflict-mode.c
blob6e280ed177118307bdd91882a5df2b544df3212a
1 /* Verify proper errors are generated for conflicted interrupt type. */
2 /* { dg-do compile } */
3 /* { dg-options "-O" } */
4 void __attribute__ ((interrupt ("user")))
5 foo(void);
7 void __attribute__ ((interrupt ("machine")))
8 foo (void)
9 { /* { dg-error "function cannot have different intterupt type." } */