1 /* { dg-do compile } */
3 /******************************************************************************
4 * OpenMP Example - Combined Parallel Loop Work-sharing - C/C++ Version
5 * FILE: omp_workshare3.c
7 * This example attempts to show use of the parallel for construct. However
8 * it will generate errors at compile time. Try to determine what is causing
9 * the error. See omp_workshare4.c for a corrected version.
10 * SOURCE: Blaise Barney 5/99
11 * LAST REVISED: 03/03/2002
12 ******************************************************************************/
23 float a
[N
], b
[N
], c
[N
];
25 /* Some initializations */
27 a
[i
] = b
[i
] = i
* 1.0;
30 #pragma omp parallel for \
33 schedule(static,chunk)
34 { /* { dg-error "expected" } */
35 tid
= omp_get_thread_num();
39 printf("tid= %d i= %d c[i]= %f\n", tid
, i
, c
[i
]);
41 } /* end of parallel for construct */