[flang-commits] [PATCH] D103571: [flang] Support known constant lengths in DynamicType

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Jun 2 17:20:00 PDT 2021


klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.

The constexpr-capable class evaluate::DynamicType represented
CHARACTER length only with a nullable pointer into the declared
parameters of types in the symbol table, which works fine for
anything with a declaration but turns out to not suffice to
describe the results of the ACHAR() and CHAR() intrinsic
functions.  So extend DynamicType to also accommodate known
constant CHARACTER lengths, too; use them for ACHAR & CHAR;
clean up several use sites and fix regressions found in test.


https://reviews.llvm.org/D103571

Files:
  flang/include/flang/Evaluate/fold.h
  flang/include/flang/Evaluate/type.h
  flang/lib/Evaluate/characteristics.cpp
  flang/lib/Evaluate/formatting.cpp
  flang/lib/Evaluate/intrinsics.cpp
  flang/lib/Evaluate/tools.cpp
  flang/lib/Evaluate/type.cpp
  flang/lib/Evaluate/variable.cpp
  flang/lib/Semantics/expression.cpp
  flang/lib/Semantics/scope.cpp
  flang/test/Semantics/array-constr-values.f90
  flang/test/Semantics/data02.f90
  flang/test/Semantics/separate-mp02.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103571.349422.patch
Type: text/x-patch
Size: 17708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210603/34eaf58f/attachment.bin>


More information about the flang-commits mailing list