[PATCH] D87151: [flang] Fix assert on constant folding of extended types

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 12:59:15 PDT 2020


PeteSteinfeld added a comment.

In D87151#2266514 <https://reviews.llvm.org/D87151#2266514>, @klausler wrote:

> In D87151#2266509 <https://reviews.llvm.org/D87151#2266509>, @PeteSteinfeld wrote:
>
>> Lines 152-155 contain a structure constructor that names the fields of the parent type without having an explicit structure constructor for the parent component:
>>
>>   type(child_type), parameter :: child_const4 = &
>>     child_type(parent_type( &
>>       parent_field3 = .true., parent_field1 = 22), &
>>       child_field1 = 23.4, child_field3 = 24)
>
> That's a structure constructor there for `parent_type()`, no?  A case with no structure constructor for the parent type would look like `child_type(parent_field3=.true., parent_field1=22, child_field1=23.4, child_field3=24)`.

Ahh....  There are structure constructors that name the parent fields directly in lines 106-110 and 130-133.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87151/new/

https://reviews.llvm.org/D87151



More information about the llvm-commits mailing list