-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Address case of under-processed array symbol (#73169)
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 #68652.
- Loading branch information
Showing
2 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
! 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 |