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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c++/] [single-2.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 735 jeremybenn
extern "C" void abort (void);
2
 
3
struct X
4
{
5
  int a;
6
  char b;
7
  int c;
8
};
9
 
10
main()
11
{
12
  int i = 0;
13
  struct X x;
14
  int bad = 0;
15
 
16
  #pragma omp parallel private (i, x) shared (bad)
17
    {
18
      i = 5;
19
 
20
      #pragma omp single copyprivate (i, x)
21
        {
22
          i++;
23
          x.a = 23;
24
          x.b = 42;
25
          x.c = 26;
26
        }
27
 
28
      if (i != 6 || x.a != 23 || x.b != 42 || x.c != 26)
29
        bad = 1;
30
    }
31
 
32
  if (bad)
33
    abort ();
34
 
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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