OSDN Git Service

Merge from transactional-memory branch.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tm / data-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm" } */
3 /* Test read and write on all basic types.  */
4
5 static char gc;
6 static signed char gsc;
7 static unsigned char guc;
8
9 static short gs;
10 static unsigned short gus;
11
12 static int gi;
13 static unsigned int gui;
14
15 static long gl;
16 static unsigned long gul;
17
18 static long long gll;
19 static unsigned long long gull;
20
21 static float gf;
22 static double gd;
23 static long double gld;
24
25 void f(void)
26 {
27   __transaction_atomic {
28     gc++;
29     gsc++;
30     guc++;
31
32     gs++;
33     gus++;
34
35     gi++;
36     gui++;
37
38     gl++;
39     gul++;
40
41     gll++;
42     gull++;
43
44     gf++;
45     gd++;
46     gld++;
47   }
48 }