Commit ab6cc6b
authored
[flang] Allow nested scopes for implied DO loops with DATA statements (#129410)
Previously, nested scopes for implied DO loops with DATA statements were
disallowed, which meant that the following code couldn't compile due to
re-use of `j` loop variable name:
DATA (a(i),(b(i,j),j=1,3),(c(i,j),j=1,3),i=0,4)/
This change allows nested scopes implied DO loops, which allows the code
above to compile.
Tests modified to in accordance with this change:
Semantics/resolve40.f90, Semantics/symbol09.f901 parent 95c64b7 commit ab6cc6b
File tree
3 files changed
+7
-12
lines changed- flang
- lib/Semantics
- test/Semantics
3 files changed
+7
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7490 | 7490 | | |
7491 | 7491 | | |
7492 | 7492 | | |
7493 | | - | |
7494 | | - | |
7495 | | - | |
7496 | | - | |
| 7493 | + | |
7497 | 7494 | | |
7498 | 7495 | | |
7499 | | - | |
7500 | | - | |
7501 | | - | |
| 7496 | + | |
7502 | 7497 | | |
7503 | 7498 | | |
7504 | 7499 | | |
| |||
7539 | 7534 | | |
7540 | 7535 | | |
7541 | 7536 | | |
7542 | | - | |
| 7537 | + | |
| 7538 | + | |
7543 | 7539 | | |
7544 | | - | |
7545 | 7540 | | |
7546 | 7541 | | |
7547 | 7542 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments