forked from OSchip/llvm-project
d60a02201d
The combined initializers constructed from DATA statements and explicit static initialization in declarations needs to include derived type component default initializations, overriding those default values without complaint with values from explicit DATA statement or declaration initializations when they overlap. This also has to work for objects with storage association due to EQUIVALENCE. When storage association causes default component initializations to overlap, emit errors if and only if the values differ (See Fortran 2018 subclause 19.5.3, esp. paragraph 10). The f18 front-end has a module that analyzes and converts DATA statements into equivalent static initializers for objects. For storage-associated objects, compiler-generated objects are created that overlay the entire association and fill it with a combined initializer. This "data-to-inits" module already exists, and this patch is essentially extension and clean-up of its machinery to complete the job. Also: emit EQUIVALENCE to module files; mark compiler-created symbols and *don't* emit those to module files; check non-static EQUIVALENCE sets for conflicting default component initializations, so lowering doesn't have to check them or emit diagnostics. Differential Revision: https://reviews.llvm.org/D109022 |
||
---|---|---|
.. | ||
Common | ||
Decimal | ||
Evaluate | ||
Frontend | ||
FrontendTool | ||
Lower | ||
Optimizer | ||
Parser | ||
Semantics | ||
CMakeLists.txt |