llvm/flang/lib
peter klausler d60a02201d [flang] Include default component initialization in static initializers
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
2021-09-01 09:40:37 -07:00
..
Common
Decimal [flang] runtime: For Fw.d formatting, don't oscillate forever 2021-08-04 12:19:23 -07:00
Evaluate [flang] Include default component initialization in static initializers 2021-09-01 09:40:37 -07:00
Frontend [flang] Refine output file generation 2021-08-21 15:18:48 +00:00
FrontendTool [flang][driver] Add support for Frontend Plugins 2021-08-12 11:42:16 +01:00
Lower [Builder] Eliminate the StringRef/StringAttr forms of getSymbolRefAttr. 2021-08-30 16:05:36 -07:00
Optimizer Change ASM Op printer to print the operation name in the framework instead of leaving it up to each individual operation 2021-08-31 17:52:40 +00:00
Parser [Flang] Fix error messages on Windows. 2021-08-12 18:35:54 +01:00
Semantics [flang] Include default component initialization in static initializers 2021-09-01 09:40:37 -07:00
CMakeLists.txt [flang][driver] Delete f18 (i.e. the old Flang driver) 2021-08-05 12:57:15 +00:00