Commit 407542b
authored
[flang] Process pointer component default initializers sooner (llvm#145601)
Name resolution defers the analysis of all object pointer initializers
to the end of a specification part, including the default initializers
of derived type data pointer components. This deferment allows object
pointer initializers to contain forward references to objects whose
declarations appear later.
However, this deferment has the unfortunate effect of causing NULL
default initialization of such object pointer components when they do
not appear in structure constructors that are used as default
initializers, and their default initializers are required. So handle
object pointer default initializers of components as they appear, as
before.1 parent f3d5759 commit 407542b
File tree
5 files changed
+51
-18
lines changed- flang
- docs
- lib/Semantics
- test/Semantics
5 files changed
+51
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
878 | 885 | | |
879 | 886 | | |
880 | 887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5383 | 5383 | | |
5384 | 5384 | | |
5385 | 5385 | | |
5386 | | - | |
| 5386 | + | |
5387 | 5387 | | |
5388 | 5388 | | |
5389 | 5389 | | |
| |||
6398 | 6398 | | |
6399 | 6399 | | |
6400 | 6400 | | |
6401 | | - | |
| 6401 | + | |
6402 | 6402 | | |
6403 | 6403 | | |
6404 | 6404 | | |
| |||
8933 | 8933 | | |
8934 | 8934 | | |
8935 | 8935 | | |
8936 | | - | |
8937 | | - | |
8938 | | - | |
| 8936 | + | |
| 8937 | + | |
| 8938 | + | |
| 8939 | + | |
| 8940 | + | |
| 8941 | + | |
| 8942 | + | |
8939 | 8943 | | |
8940 | 8944 | | |
8941 | 8945 | | |
| |||
10355 | 10359 | | |
10356 | 10360 | | |
10357 | 10361 | | |
10358 | | - | |
10359 | | - | |
10360 | | - | |
10361 | | - | |
10362 | | - | |
10363 | 10362 | | |
10364 | 10363 | | |
10365 | 10364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | | - | |
58 | | - | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
104 | | - | |
105 | | - | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | | - | |
| 110 | + | |
108 | 111 | | |
109 | | - | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments