Files
clang-p2996/flang/test/Semantics/bug869.f90
Peter Klausler ff8288442d [flang] Fix crash in error recovery (#140768)
When a TYPE(*) dummy argument is erroneously used as a component value
in a structure constructor, semantics crashes if the structure
constructor had been initially parsed as a potential function reference.
Clean out stale typed expressions when reanalyzing the reconstructed
parse subtree to ensure that errors are caught the next time around.
2025-05-28 13:59:48 -07:00

11 lines
237 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Regression test for crash
subroutine sub(xx)
type(*) :: xx
type ty
end type
type(ty) obj
!ERROR: TYPE(*) dummy argument may only be used as an actual argument
obj = ty(xx)
end