Files
clang-p2996/clang/test/SemaOpenACC/gh140712.cpp
erichkeane 2f66e5fcba [OpenACC] Fixed error recovery during jump diagnostics for OpenACC
We didn't consider/test a case where the structured block/loop would be
empty, which happens when the body is ONLY a break.

Fixes: #140712
2025-05-20 06:31:13 -07:00

10 lines
207 B
C++

// RUN: %clang_cc1 %s -fopenacc -verify
void foo() {
switch (int x = 0) {
case 0:
#pragma acc parallel
break; // expected-error{{invalid branch out of OpenACC Compute/Combined Construct}}
}
}