blob: 0cb8d3cbda6f257a59c415b1d34da2d4a3224820 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* { dg-do link } */
/* { dg-options "-O -mgeneral-regs-only -mno-cld -g" } */
#include <stdint.h>
extern void link_error (void);
typedef unsigned int uword_t __attribute__ ((mode (__word__)));
struct interrupt_frame
{
uword_t ip;
uword_t cs;
uword_t flags;
uword_t sp;
uword_t ss;
};
__attribute__ ((used, interrupt))
void
foo (struct interrupt_frame *frame)
{
void *ra = __builtin_return_address (0);
if ((uintptr_t) ra != (uintptr_t) frame->ip)
link_error ();
}
int
main (void)
{
return 0;
}
|