Skip to content

[Flang] Compiler ICEs with failing assert for Fortuno test framework #105848

@mjklemm

Description

@mjklemm

Flang fails to compile the Fortuno unit test framework:

fatal internal error: CHECK(category_ == TypeDerived || category_ == ClassDerived) failed at /llvm/llvm-project/flang/include/flang/Semantics/type.h(390)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /llvm/llvm-project/build-dev/bin/flang-new -fc1 -triple x86_64-unknown-linux-gnu -emit-obj -I /llvm/stuff/MPCDF/fortuno/src/fortuno_serial -I /llvm/stuff/MPCDF/fortuno/build/src/modules -ffixed-line-length=72 -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu x86-64 -module-dir src/modules -debug-info-kind=standalone -resource-dir /llvm/llvm-project/build-dev/lib/clang/20 -mframe-pointer=none -O2 -o src/CMakeFiles/fortuno_serial.dir/fortuno_serial/serialcase.f90.o -x f95-cpp-input src/CMakeFiles/fortuno_serial.dir/fortuno_serial/serialcase.f90-pp.f90
 #0 0x00007de2752ed5a0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/llvm/llvm-project/build-dev/lib/libLLVMSupport.so.20.0git+0x1d15a0)
 #1 0x00007de2752eab7e SignalHandler(int) Signals.cpp:0:0
 #2 0x00007de274a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007de274a969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #4 0x00007de274a969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #5 0x00007de274a969fc pthread_kill ./nptl/pthread_kill.c:89:10
 #6 0x00007de274a42476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #7 0x00007de274a287f3 abort ./stdlib/abort.c:81:7
 #8 0x00007de274c48140 Fortran::common::getFlangRepositoryPath[abi:cxx11]() (/llvm/llvm-project/build-dev/lib/libFortranCommon.so.20.0git+0x3140)

Steps to reproduce:

git clone https://github.com/fortuno-repos/fortuno 
cd fortuno 
cmake -S . -B _build/ -DFORTUNO_BUILD_SHARED_LIBS=OFF -DCMAKE_Fortran_COMPILER=flang-new 
cmake --build _build/ 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions