Issue 239945
Summary [flang] `CHECK(array) failed` in `Folder::ApplyComponent` when folding a component of a PARAMETER array of an extended type whose parent has an undefined component type
Labels crash, flang, generated by fuzzer
Assignees
Reporter YuanchengJiang
    The following code:
```fortran
module m
 type :: t2
    type(t1) :: x = t1()
  end type
  type, extends(t2) :: t
 complex :: z
  end type
  type(t), parameter :: tz(*) = [t((3., 4.)), t((5., 6.))]
  logical, parameter :: test_6 = all(tz%z%im == [4., 6.])
end module
```

Resulted in this output:
```
fatal internal error: CHECK(array) failed at /root/llvm-project/flang/lib/Evaluate/fold-implementation.h(343)
```

Trunk reproducer (`-fsyntax-only`): https://godbolt.org/z/ser58sKd8
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to