OSDN Git Service

+ * trans-mem.c (requires_barrier): Do not instrument thread local
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tm / threadlocal-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O -fdump-tree-tmedge" } */
3 __thread int notshared = 0;
4 int shared = 0;
5
6 int main()
7 {
8   __transaction_atomic
9     {
10       notshared++;
11       shared++;
12     }
13   return notshared + shared;
14 }
15 /* { dg-final { scan-tree-dump-times "tm_save.\[0-9_\]+ = notshared" 1 "tmedge" } } */
16 /* { dg-final { scan-tree-dump-times "notshared = tm_save" 1 "tmedge" } } */
17 /* { dg-final { cleanup-tree-dump "tmedge" } } */