Issue 80884
Summary [flang] Segfault in lowering ConvertExpr
Labels flang
Assignees
Reporter bcornille
    When building one of the [GenASiS Basic](https://github.com/GenASiS/GenASiS_Basics) codes I encountered a segfault in flang. Best guess is this is related polymorphic types and extended types.

```
...
 #3 0x00007ff2b3525a24 fir::FirOpBuilder::getRefType(mlir::Type) (/share/contrib-modules/Core/amd-trunk-dev/2024-02-06_18.0-0/bin/../lib/../lib/libFIRBuilder.so.19git+0x6aa24)
 #4 0x00007ff2b9a5d954 (anonymous namespace)::ScalarExprLowering::genComponent(Fortran::evaluate::Component const&) ConvertExpr.cpp:0:0
 #5 0x00007ff2b9a5dabe (anonymous namespace)::ScalarExprLowering::gen(Fortran::evaluate::Component const&) ConvertExpr.cpp:0:0
 #6 0x00007ff2b9a5db4c (anonymous namespace)::ScalarExprLowering::genval(Fortran::evaluate::Component const&) ConvertExpr.cpp:0:0
 #7 0x00007ff2b9a5dbfc std::__detail::__variant::__gen_vtable_impl...
...
flang-new version 19.0.0git (https://github.com/ROCm/llvm-project 58ac649a15feb2a8bbaf07c0c1d30054b0bb6af3)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /share/contrib-modules/Core/amd-trunk-dev/2024-02-06_18.0-0/bin
Configuration file: /share/contrib-modules/Core/amd-trunk-dev/2024-02-06_18.0-0/bin/flang.cfg
flang-new: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
flang-new: note: diagnostic msg: /tmp/StructuredGridImage_Form-2b7399
flang-new: note: diagnostic msg: /tmp/StructuredGridImage_Form-2b7399.sh
```

I have attached the preprocessed source, full error message, and module files that may be needed to reproduce the compiler error.
[StructuredGridImage_Form.zip](https://github.com/llvm/llvm-project/files/14184239/StructuredGridImage_Form.zip)
[StructuredGridImage_Form-modules.zip](https://github.com/llvm/llvm-project/files/14184355/StructuredGridImage_Form-modules.zip)

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to