llvm-project/flang/test/Parser/OpenMP/fail-construct2.f90
Krzysztof Parzyszek 06fc87bcd3
[flang][OpenMP] Better diagnostics for invalid or misplaced directives (#168885)
Add two more AST nodes, one for a misplaced end-directive, and one for
an invalid string following the OpenMP sentinel (e.g. "!$OMP XYZ").

Emit error messages when either node is encountered in semantic
analysis.
2025-11-23 07:55:10 -06:00

6 lines
126 B
Fortran

! RUN: not %flang_fc1 -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s
! CHECK: error: Invalid OpenMP directive
!$omp dummy
end