2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / interrupt-5.c
blob803c06362999c9f801bcb82dc34d7d7f3be12016
1 /* { dg-do link } */
2 /* { dg-options "-O -mgeneral-regs-only -mno-cld -g" } */
4 #include <stdint.h>
6 extern void link_error (void);
8 typedef unsigned int uword_t __attribute__ ((mode (__word__)));
10 __attribute__ ((used, interrupt))
11 void
12 foo (void *frame, uword_t error)
14 void *ra = __builtin_return_address (0);
15 if ((uintptr_t) ra != (uintptr_t) error)
16 link_error ();
19 int
20 main (void)
22 return 0;