llvm-project/flang/test/Parser/OpenMP/nested-directive.f90
Michael Kruse 2dc0fa1000
[Flang] Nested directives are comments (#166348)
Directives cannot be nested. A directive sentinel that appears within
another directive should be ignored, and instead fall back to be treated
as a line comment.

Fixes: #165874
2025-11-04 17:43:17 +01:00

8 lines
258 B
Fortran

! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s 2>&1 | FileCheck %s --match-full-lines
subroutine func
implicit none
! CHECK: !$OMP NOTHING
!$omp nothing !$omp Cannot nest directives inside directives; must be interpreted as a comment
end subroutine func