Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/c11-thread-local-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Test for _Thread_local in C11. Test of valid code. */ | |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-std=c11 -pedantic-errors" } */ | |
4 | |
5 _Thread_local int a; | |
6 static _Thread_local long b; | |
7 extern _Thread_local int c, a; | |
8 _Thread_local static int d; | |
9 long _Thread_local extern b; | |
10 _Thread_local int extern a; | |
11 _Thread_local struct s; /* { dg-warning "useless" } */ | |
12 _Thread_local int a = 1; | |
13 extern _Thread_local int c = 2; /* { dg-warning "initialized and" } */ | |
14 void | |
15 f (void) | |
16 { | |
17 static _Thread_local int x; | |
18 extern _Thread_local long b; | |
19 _Thread_local extern int a; | |
20 } | |
21 | |
22 inline void | |
23 fi (void) | |
24 { | |
25 static _Thread_local const int v; | |
26 (void) a; | |
27 static _Thread_local int (*const p)[a]; | |
28 } |