brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 7303836 Raw
25 lines · c
1// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s2 3int incomplete[];4 5void test(int *p) {6  int a;7#pragma omp parallel reduction( // expected-error {{expected identifier}} expected-error {{expected ')'}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-note {{to match this '('}}8  ;9#pragma omp parallel reduction(unknown // expected-error {{expected expression}} expected-error {{expected ')'}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-note {{to match this '('}}10  ;11#pragma omp parallel reduction(default, // expected-error {{expected identifier}} expected-error {{expected ')'}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-note {{to match this '('}}12  ;13#pragma omp parallel reduction(unknown, +: a) // expected-error {{expected 'default', 'inscan' or 'task' in OpenMP clause 'reduction'}}14  ;15#pragma omp parallel reduction(default, + : a)16  ;17#pragma omp parallel reduction(inscan, + : a) // expected-error {{'inscan' modifier can be used only in 'omp for', 'omp simd', 'omp for simd', 'omp parallel for', or 'omp parallel for simd' directive}}18  ;19#pragma omp parallel reduction(+ : incomplete, ([10])p) // expected-error {{a reduction list item with incomplete type 'int[]'}} expected-error {{expected variable name, array element or array section}}20  ;21}22 23// complete to suppress an additional warning, but it's too late for pragmas24int incomplete[3];25