teak-llvm/clang/test/OpenMP/parallel_reduction_messages.c
Joel E. Denny 3cabf73270 [OPENMP] Fix incomplete type check for array reductions
A reduction for an incomplete array type used to produce an assert
fail during codegen.  Now it produces a diagnostic.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D48735

llvm-svn: 335911
2018-06-28 19:54:49 +00:00

12 lines
320 B
C

// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
int incomplete[];
void test() {
#pragma omp parallel reduction(+ : incomplete) // expected-error {{a reduction list item with incomplete type 'int []'}}
;
}
// complete to suppress an additional warning, but it's too late for pragmas
int incomplete[3];