llvm-project/flang/test
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
..
Driver [flang] Refine output file generation 2021-08-21 15:18:48 +00:00
Evaluate [flang] Fold UNPACK and TRANSPOSE 2021-08-31 13:25:35 -07:00
Examples [flang][driver] Add print function name Plugin example 2021-08-19 08:25:34 +00:00
Fir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
Frontend [flang][nfc] Remove `flang-new-driver` from LIT 2021-08-13 08:17:40 +00:00
Lower [flang] Update the regression tests to use the new driver when enabled 2021-04-15 08:52:23 +00:00
NonGtestUnit [flang] Run non-gtest unit tests with lit. 2020-07-24 14:49:39 +01:00
Parser [flang] Produce proper "preprocessor output" for -E option 2021-07-30 15:13:56 -07:00
Preprocessing [flang][nfc] Add a regression test for #50993 2021-08-02 18:21:23 +00:00
Runtime [flang] Implement Posix version of DATE_AND_TIME runtime 2021-08-25 11:16:52 +02:00
Semantics [flang] Include default component initialization in static initializers 2021-09-01 09:40:37 -07:00
Unit [flang] unit test support for out-of-tree and in-tree using google tests framework 2020-06-15 22:09:56 +05:30
CMakeLists.txt [flang][driver] Add print function name Plugin example 2021-08-19 08:25:34 +00:00
lit.cfg.py [flang] Implement Posix version of DATE_AND_TIME runtime 2021-08-25 11:16:52 +02:00
lit.site.cfg.py.in [flang] Refine output file generation 2021-08-21 15:18:48 +00:00