aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-1.c
blob: cadacc842750232b2a51acc38cdddf57edd9ba26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-require-effective-target fopenmp } */
/* { dg-additional-options "-fopenmp -Wall" } */

typedef struct _Image
{
  int columns, rows;
} Image;

extern int get_num_threads(void);

void
test (Image* image)
{
  int y;

#pragma omp parallel for schedule(static) \
  num_threads(get_num_threads ())

  for (y = 0; y < image->rows; y++) {
    /* [...snip...] */
  }
}