aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tm/data-1.c
blob: 16061476e08e8663a59535f2cac70a2ec826d911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */
/* Test read and write on all basic types.  */

static char gc;
static signed char gsc;
static unsigned char guc;

static short gs;
static unsigned short gus;

static int gi;
static unsigned int gui;

static long gl;
static unsigned long gul;

static long long gll;
static unsigned long long gull;

static float gf;
static double gd;
static long double gld;

void f(void)
{
  __transaction_atomic {
    gc++;
    gsc++;
    guc++;

    gs++;
    gus++;

    gi++;
    gui++;

    gl++;
    gul++;

    gll++;
    gull++;

    gf++;
    gd++;
    gld++;
  }
}