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

void
bar (int *p)
{
  int m;
#pragma omp parallel for
  for (m = 0; m < 1000; ++m)
    switch (p[m])
      {
      case 1:
	p[m] = 2;
	break;
      default:
	p[m] = 3;
	break;
      }
}