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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [sharing-2.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
struct T
4
{
5
  int i;
6
  mutable int j;
7
};
8
struct S
9
{
10
  const static int d = 1;
11
  const static T e;
12
  void foo (int, T);
13
};
14
 
15
const int S::d;
16
const T S::e = { 2, 3 };
17
 
18
void bar (const int &);
19
 
20
void
21
S::foo (const int x, const T y)
22
{
23
  #pragma omp parallel firstprivate (x)
24
    bar (x);
25
  #pragma omp parallel firstprivate (d)
26
    bar (d);
27
  #pragma omp parallel firstprivate (y)
28
    bar (y.i);
29
  #pragma omp parallel firstprivate (e) // { dg-error "is predetermined" }
30
    bar (e.i);
31
  #pragma omp parallel shared (x)       // { dg-error "is predetermined" }
32
    bar (x);
33
  #pragma omp parallel shared (d)       // { dg-error "is predetermined" }
34
    bar (d);
35
  #pragma omp parallel shared (e)       // { dg-error "is predetermined" }
36
    bar (e.i);
37
  #pragma omp parallel shared (y)
38
    bar (y.i);
39
  #pragma omp parallel private (x)      // { dg-error "is predetermined" }
40
    bar (x);
41
  #pragma omp parallel private (d)      // { dg-error "is predetermined" }
42
    bar (d);
43
  #pragma omp parallel private (y)
44
    bar (y.i);
45
  #pragma omp parallel private (e)      // { dg-error "is predetermined" }
46
    bar (e.i);
47
}

powered by: WebSVN 2.1.0

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