llvm-project/flang/lib
Peter Klausler 9e7eef9989 [flang] Handle parameter-dependent types in PDT initializers
For parameterized derived type component initializers whose
expressions' types depend on parameter values, f18's current
scheme of analyzing the initialization expression once during
name resolution fails.  For example,

  type :: pdt(k)
    integer, kind :: k
    real :: component = real(0.0, kind=k)
  end type

To handle such cases, it is necessary to re-analyze the parse
trees of these initialization expressions once for each distinct
initialization of the type.

This patch adds code to wipe an expression parse tree of its
typed expressions, and update those of its symbol table pointers
that reference type parameters, and then re-analyze that parse
tree to generate the properly typed component initializers.

Differential Revision: https://reviews.llvm.org/D123728
2022-04-15 16:20:41 -07:00
..
Common [flang] Use the Flang cmake-functions to add targets. 2020-04-16 15:51:30 +01:00
Decimal [flang] Runtime performance improvements to real formatted input 2021-11-12 11:40:02 -08:00
Evaluate [flang] Fix Symbol::Rank for ProcEntityDetails 2022-04-15 09:54:48 -07:00
Frontend [flang][driver] Add support for `-mmlir` 2022-04-14 09:40:31 +00:00
FrontendTool [flang][driver] Add support for `-mmlir` 2022-04-14 09:40:31 +00:00
Lower [OpenMP] Lowering to MLIR of ordered threads directive 2022-04-13 22:30:52 +08:00
Optimizer [Flang][OpenMP] Add implementation of privatisation 2022-04-11 09:20:22 +00:00
Parser [flang] Handle parameter-dependent types in PDT initializers 2022-04-15 16:20:41 -07:00
Semantics [flang] Handle parameter-dependent types in PDT initializers 2022-04-15 16:20:41 -07:00
CMakeLists.txt [flang][driver] Delete `f18` (i.e. the old Flang driver) 2021-08-05 12:57:15 +00:00