OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [atomic-1.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
 
3
int x;
4
volatile int y;
5
volatile unsigned char z;
6
 
7
void f1(void)
8
{
9
  #pragma omp atomic
10
    x++;
11
  #pragma omp atomic
12
    x--;
13
  #pragma omp atomic
14
    ++x;
15
  #pragma omp atomic
16
    --x;
17
  #pragma omp atomic
18
    x += 1;
19
  #pragma omp atomic
20
    x -= y;
21
  #pragma omp atomic
22
    x |= 1;
23
  #pragma omp atomic
24
    x &= 1;
25
  #pragma omp atomic
26
    x ^= 1;
27
  #pragma omp atomic
28
    x *= 3;
29
  #pragma omp atomic
30
    x /= 3;
31
  #pragma omp atomic
32
    x /= 3;
33
  #pragma omp atomic
34
    x <<= 3;
35
  #pragma omp atomic
36
    x >>= 3;
37
}
38
 
39
void f2(void)
40
{
41
  #pragma omp atomic
42
    y++;
43
  #pragma omp atomic
44
    y--;
45
  #pragma omp atomic
46
    ++y;
47
  #pragma omp atomic
48
    --y;
49
  #pragma omp atomic
50
    y += 1;
51
  #pragma omp atomic
52
    y -= x;
53
  #pragma omp atomic
54
    y |= 1;
55
  #pragma omp atomic
56
    y &= 1;
57
  #pragma omp atomic
58
    y ^= 1;
59
  #pragma omp atomic
60
    y *= 3;
61
  #pragma omp atomic
62
    y /= 3;
63
  #pragma omp atomic
64
    y /= 3;
65
  #pragma omp atomic
66
    y <<= 3;
67
  #pragma omp atomic
68
    y >>= 3;
69
}
70
 
71
void f3(void)
72
{
73
  #pragma omp atomic
74
    z++;
75
  #pragma omp atomic
76
    z--;
77
  #pragma omp atomic
78
    ++z;
79
  #pragma omp atomic
80
    --z;
81
  #pragma omp atomic
82
    z += 1;
83
  #pragma omp atomic
84
    z |= 1;
85
  #pragma omp atomic
86
    z &= 1;
87
  #pragma omp atomic
88
    z ^= 1;
89
  #pragma omp atomic
90
    z *= 3;
91
  #pragma omp atomic
92
    z /= 3;
93
  #pragma omp atomic
94
    z /= 3;
95
  #pragma omp atomic
96
    z <<= 3;
97
  #pragma omp atomic
98
    z >>= 3;
99
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.