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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 735 jeremybenn
// PR c++/48869
2
// { dg-do run }
3
// { dg-options "-std=gnu++0x" }
4
 
5
template 
6
struct A
7
{
8
  A () {}
9
  A (const A&) = delete;
10
  void foo () {}
11
  ~A () {}
12
};
13
 
14
template 
15
struct B
16
{
17
  B () {}
18
  B (const B&) {}
19
  void foo () {}
20
  ~B () {}
21
};
22
 
23
void __attribute__((used))
24
foo (B<6> b6)
25
{
26
  #pragma omp task
27
    b6.foo ();
28
}
29
 
30
int
31
main ()
32
{
33
  A<0> a0;
34
  #pragma omp task shared(a0)
35
    a0.foo ();
36
  #pragma omp task default(shared)
37
    a0.foo ();
38
  #pragma omp parallel shared(a0)
39
    #pragma omp task
40
      a0.foo ();
41
  #pragma omp task
42
  {
43
    A<1> a1;
44
    a1.foo ();
45
  }
46
  B<0> b0;
47
  #pragma omp task shared(b0)
48
    b0.foo ();
49
  B<1> b1;
50
  #pragma omp task default(shared)
51
    b1.foo ();
52
  B<2> b2;
53
  #pragma omp parallel shared(b2)
54
    #pragma omp task
55
      b2.foo ();
56
  B<3> b3;
57
  #pragma omp task
58
    b3.foo ();
59
  B<4> b4;
60
  #pragma omp parallel private (b4)
61
    #pragma omp task
62
      b4.foo ();
63
  B<5> b5;
64
  #pragma omp parallel firstprivate (b5)
65
    #pragma omp task
66
      b5.foo ();
67
  return 0;
68
}

powered by: WebSVN 2.1.0

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