mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 23:06:34 +00:00

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.
15 lines
375 B
Fortran
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
|