mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 14:26:49 +00:00

Array element references are frequently parsed as function references due to the ambiguous syntax of Fortran, and the parse tree is repaired by semantics once the relevant symbol table entries are in hand. This patch fixes a case in which the correction takes a path that leaves the type of a symbol undetermined, leading to later spurious errors in expression analysis. Fixes https://github.com/llvm/llvm-project/issues/68652.
12 lines
388 B
Fortran
12 lines
388 B
Fortran
! RUN: %python %S/test_symbols.py %s %flang_fc1
|
|
! Ensure that a misparsed function reference that turns out to be an
|
|
! array element reference still applies implicit typing, &c.
|
|
!DEF: /subr (Subroutine) Subprogram
|
|
subroutine subr
|
|
!DEF: /subr/moo (Implicit) ObjectEntity INTEGER(4)
|
|
common //moo(1)
|
|
!DEF: /subr/a ObjectEntity REAL(4)
|
|
!REF: /subr/moo
|
|
real a(moo(1))
|
|
end subroutine
|