summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/pr27337-2.C
blob: d1ae4a139f22e7cca7ae260427c6b9c1a3cfc6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR middle-end/27337
// { dg-do compile }

struct S
{
  S ();
  ~S ();
  int i;
};

S
foo ()
{
  int i;
  S ret;

#pragma omp parallel for firstprivate (ret) lastprivate (ret)
  for (i = 0; i < 2; i++)
    ret.i += i;

  return ret;
}