12 lines · c
1// RUN: %clang_cc1 -fopenmp-simd -fsyntax-only -verify %s2// see https://github.com/llvm/llvm-project/issues/69069 3// or https://github.com/llvm/llvm-project/pull/714804 5void test() {6 int v; const int x = 0; // expected-note {{variable 'x' declared const here}}7#pragma omp atomic capture8 { 9 v = x; 10 x = 1; // expected-error {{cannot assign to variable 'x' with const-qualified type 'const int'}} 11 }12}