summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/pr36237.C
blob: 29c7adc8a27d01dd6fad9df58303a1b9cd416d9c (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
// PR c++/36237
// { dg-do compile }
// { dg-options "-fopenmp" }

struct A
{
  ~A ();
};

struct B
{
  B (const A &x = A ()) : a (x) { }
  A a;
};

B var;

void bar ();

void
foo ()
{
  #pragma omp parallel private (var)
    bar ();
}