summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/method-1.C
blob: 3d8235656b171dbc10180d3b1a9944bf93c8d729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR c++/24513 */
/* { dg-do compile } */

struct S
{
  void foo (int *p)
  {
#pragma omp parallel for
    for (int i = 0; i < 1000; ++i)
      p[i]=0;
  }
  void bar ()
  {
#pragma omp master
    j = 2;
  }
  int j;
};