llvm-project/flang/test/Semantics/procinterface05.f90
Peter Klausler c9f94baca5
[flang] Fix crash in error recovery (implicit host association) (#92795)
When a symbol appears in a specification expression in a subprogram
contained in a host program unit, semantics may have to create a symbol
in the host and use host association to it. This shouldn't happen for
nested subprograms that can't import such a symbol, such as interface
blocks by default. Further, when host association fails, semantics
shouldn't crash.

Fixes https://github.com/llvm/llvm-project/issues/92647.
2024-05-23 13:41:08 -07:00

15 lines
375 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
interface a1
subroutine s1
interface a2
subroutine s2
!ERROR: Invalid specification expression: reference to local entity 'k'
real x(k)
end subroutine
end interface
!ERROR: Invalid specification expression: reference to local entity 'k'
real y(k)
end subroutine
end interface
end