xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/tls/diag-3.c (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 /* Report invalid extern and __thread combinations.  */
2 
3 extern int j;		/* { dg-error "previous declaration" } */
4 __thread int j;		/* { dg-error "follows non thread-local" } */
5 
6 extern __thread int i;	/* { dg-error "previous declaration" } */
7 int i;			/* { dg-error "follows thread-local" } */
8 
9 extern __thread int k;	/* This is fine.  */
10 __thread int k;
11