* gcc.target/i386/pr70021.c: Add -mtune=skylake.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / interrupt-5.c
blob5742b6f474334af9fbe61c532c19485f1ee9df17
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 struct interrupt_frame
12 uword_t ip;
13 uword_t cs;
14 uword_t flags;
15 uword_t sp;
16 uword_t ss;
19 __attribute__ ((used, interrupt))
20 void
21 foo (struct interrupt_frame *frame, uword_t error)
23 void *ra = __builtin_return_address (0);
24 if ((uintptr_t) ra != (uintptr_t) frame->ip)
25 link_error ();
28 int
29 main (void)
31 return 0;