diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/interrupt-5.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/interrupt-5.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/interrupt-5.c b/gcc/testsuite/gcc.target/i386/interrupt-5.c new file mode 100644 index 00000000000..21ffea3bc13 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/interrupt-5.c @@ -0,0 +1,23 @@ +/* { dg-do link } */ +/* { dg-options "-O -mno-mpx -mno-sse -mno-mmx -mno-80387 -mno-cld -g" } */ + +#include <stdint.h> + +extern void link_error (void); + +typedef unsigned int uword_t __attribute__ ((mode (__word__))); + +__attribute__ ((used, interrupt)) +void +foo (void *frame, uword_t error) +{ + void *ra = __builtin_return_address (0); + if ((uintptr_t) ra != (uintptr_t) error) + link_error (); +} + +int +main (void) +{ + return 0; +} |