Files
clang-p2996/flang/test/Semantics/OpenMP/bad_module_subroutine.f90
Tom Eccles 41d5fed09e [flang][Semantics] set scope even for module subroutines outside modules (#109009)
The missing scope information led to a crash in OpenMP semantic checks
run before printing the error that was already discovered in the code.

The following block has to be skipped for this invalid code so that we
don't emit a second spurious error.

Fixes #82913
2024-09-18 10:40:41 +01:00

7 lines
274 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! Test that we don't crash on this code inside of openmp semantics checks
!ERROR: 'e' is a MODULE procedure which must be declared within a MODULE or SUBMODULE
impure elemental module subroutine e()
end subroutine