aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr121208-2a.c
blob: c1891ae322c63ac8112a72e637cf1ab6e6ef6258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile { target *-*-linux* } } */
/* { dg-options "-O2 -fPIC -mtls-dialect=gnu" } */

typedef unsigned int uword_t __attribute__ ((mode (__word__)));
extern __thread int bar;
extern void func (void);

__attribute__((target("general-regs-only")))
__attribute__((interrupt))
void
foo (void *frame, uword_t error)
{
  bar = 1; /* { dg-error -mtls-dialect=gnu2 } */
  if (error == 0)
    func ();
  bar = 0;
}