Commit 5e2788c
committed
[flang] Fix spurious error messages due to INTRINSIC nested in BLOCK
When skimmming executable parts to collect names used in procedure calls,
it is important to exclude names that have local declarations in nested BLOCK
constructs. The mechanism for handling these nested declarations was catching
only names whose declarations include an "entity-decl", and so names appearing
in other declaration statements (like INTRINSIC and EXTERNAL statements) were
not hidden from the scan, leading to absurd error messages when such names
turn out to be procedures in the nested BLOCK construct but to not be
procedures outside it.
This patch fixes the code that detects local declarations in BLOCK
for all of the missed cases that don't use entity-decls; only INTRINSIC
and EXTERNAL could affect the procedures whose names are of interest
to the executable part skimmer, but perhaps future work will want to
collect non-procedures as well, so I plugged all of the holes that I
could find.
Fixes #115674.1 parent fef4c8a commit 5e2788c
File tree
2 files changed
+59
-3
lines changed- flang
- lib/Semantics
- test/Semantics
2 files changed
+59
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4787 | 4787 | | |
4788 | 4788 | | |
4789 | 4789 | | |
4790 | | - | |
4791 | | - | |
4792 | | - | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
4793 | 4793 | | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
4794 | 4797 | | |
4795 | 4798 | | |
4796 | 4799 | | |
| |||
7660 | 7663 | | |
7661 | 7664 | | |
7662 | 7665 | | |
| 7666 | + | |
| 7667 | + | |
| 7668 | + | |
| 7669 | + | |
7663 | 7670 | | |
7664 | 7671 | | |
7665 | 7672 | | |
7666 | 7673 | | |
| 7674 | + | |
| 7675 | + | |
| 7676 | + | |
| 7677 | + | |
| 7678 | + | |
| 7679 | + | |
| 7680 | + | |
| 7681 | + | |
| 7682 | + | |
| 7683 | + | |
| 7684 | + | |
| 7685 | + | |
| 7686 | + | |
| 7687 | + | |
| 7688 | + | |
| 7689 | + | |
| 7690 | + | |
| 7691 | + | |
| 7692 | + | |
| 7693 | + | |
| 7694 | + | |
| 7695 | + | |
| 7696 | + | |
| 7697 | + | |
| 7698 | + | |
| 7699 | + | |
| 7700 | + | |
| 7701 | + | |
| 7702 | + | |
| 7703 | + | |
| 7704 | + | |
| 7705 | + | |
| 7706 | + | |
| 7707 | + | |
| 7708 | + | |
| 7709 | + | |
| 7710 | + | |
| 7711 | + | |
| 7712 | + | |
| 7713 | + | |
7667 | 7714 | | |
7668 | 7715 | | |
7669 | 7716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments