aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/interrupt-5.c
blob: 803c06362999c9f801bcb82dc34d7d7f3be12016 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { 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__)));

__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;
}