Shilei Tian 52b4bec939
[Clang][OpenMP] Emit unroll directive w/o captured stmt (#65862)
The front end doesn't create captured stmt for unroll directive. This
leads to
a crash when `-fopenmp-simd` is used, as reported in #63570.

Fix #63570.
2023-09-09 18:51:58 -04:00

11 lines
286 B
C

// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-apple-darwin10 %s
// RUN: %clang_cc1 -verify -fopenmp-simd -x c -triple x86_64-apple-darwin10 %s
// expected-no-diagnostics
void f(float *a, float *b) {
#pragma omp unroll
for (int i = 0; i < 128; i++) {
a[i] = b[i];
}
}