Commit 86b0052
[flang] Catch more initialization errors (llvm#77850)
[flang] Catch more initialization errors
Diagnose some error cases related to initialization that are
slipping past semantic checking: don't allow multiple initializations
of the same symbol, and don't allow an object that was initialized
as a scalar to become an array afterward.
Fixes llvm-test-suite/Fortran/gfortran/regression/initialization_17.f90.1 parent b76a177 commit 86b0052
File tree
3 files changed
+33
-2
lines changed- flang
- lib/Semantics
- test/Semantics
3 files changed
+33
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4554 | 4554 | | |
4555 | 4555 | | |
4556 | 4556 | | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
4557 | 4560 | | |
4558 | 4561 | | |
4559 | 4562 | | |
| |||
4932 | 4935 | | |
4933 | 4936 | | |
4934 | 4937 | | |
| 4938 | + | |
| 4939 | + | |
4935 | 4940 | | |
4936 | 4941 | | |
4937 | 4942 | | |
| |||
7577 | 7582 | | |
7578 | 7583 | | |
7579 | 7584 | | |
| 7585 | + | |
7580 | 7586 | | |
7581 | 7587 | | |
7582 | 7588 | | |
| 7589 | + | |
7583 | 7590 | | |
7584 | 7591 | | |
7585 | 7592 | | |
| |||
7679 | 7686 | | |
7680 | 7687 | | |
7681 | 7688 | | |
| 7689 | + | |
| 7690 | + | |
7682 | 7691 | | |
7683 | 7692 | | |
7684 | 7693 | | |
| |||
8928 | 8937 | | |
8929 | 8938 | | |
8930 | 8939 | | |
8931 | | - | |
| 8940 | + | |
| 8941 | + | |
| 8942 | + | |
| 8943 | + | |
| 8944 | + | |
| 8945 | + | |
8932 | 8946 | | |
8933 | 8947 | | |
8934 | 8948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
0 commit comments