summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/pr27337-1.C
blob: 6c26070ab349b7cf12cd0d561999c545de358405 (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 ();
  double &operator* () const;
};

S
foo ()
{
  int i;
  S ret;

#pragma omp parallel for
  for (i = 0; i < 2; i++)
    *ret += i;

  return ret;
}