Issue 90192
Summary [Flang] fatal internal error: CHECK(dtSym.has<UseErrorDetails>()) failed at /root/llvm-project/flang/lib/Semantics/mod-file.cpp(205)
Labels flang
Assignees
Reporter k-arrows
    Reproducible on Godbolt:
https://godbolt.org/z/E4E9dMx1d

Reproducer:
```console
$ cat test.f90
module m
    type t
    end type
end module

module mm
    use m
    interface t
    end interface
end module
```

Stack dump:
```console
fatal internal error: CHECK(dtSym.has<UseErrorDetails>()) failed at /root/llvm-project/flang/lib/Semantics/mod-file.cpp(205)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new -fc1 -triple x86_64-unknown-linux-gnu -S -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu x86-64 -mllvm -x86-asm-syntax=intel -resource-dir /opt/compiler-explorer/clang-llvmflang-trunk-20240418/lib/clang/19 -mframe-pointer=all -o /app/output.s -x f95-cpp-input /app/example.f90
 #0 0x00000000036a9c18 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x36a9c18)
 #1 0x00000000036a758c SignalHandler(int) Signals.cpp:0:0
 #2 0x0000721f90c42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x0000721f90c969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x0000721f90c42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x0000721f90c287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x0000000004b1fc69 (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x4b1fc69)
 #7 0x00000000041ff17b (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x41ff17b)
 #8 0x00000000041ff1ea Fortran::semantics::ModFileWriter::PrepareRenamings(Fortran::semantics::Scope const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x41ff1ea)
 #9 0x00000000042070a0 Fortran::semantics::ModFileWriter::PutSymbols(Fortran::semantics::Scope const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x42070a0)
#10 0x0000000004206281 Fortran::semantics::ModFileWriter::Write(Fortran::semantics::Symbol const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x4206281)
#11 0x0000000004207ef0 Fortran::semantics::ModFileWriter::WriteAll() (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x4207ef0)
#12 0x000000000403b8cf Fortran::semantics::Semantics::Perform() (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x403b8cf)
#13 0x00000000036ee4e7 Fortran::frontend::FrontendAction::runSemanticChecks() (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x36ee4e7)
#14 0x0000000003a18c70 Fortran::frontend::CodeGenAction::beginSourceFileAction() (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x3a18c70)
#15 0x00000000036edac5 Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&, Fortran::frontend::FrontendInputFile const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x36edac5)
#16 0x00000000036dd407 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x36dd407)
#17 0x00000000036f3d4d Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x36f3d4d)
#18 0x0000000001e7cfc8 fc1_main(llvm::ArrayRef<char const*>, char const*) (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x1e7cfc8)
#19 0x0000000001d6c7dd main (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x1d6c7dd)
#20 0x0000721f90c29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#21 0x0000721f90c29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#22 0x0000000001e7bf2e _start (/opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin/flang-new+0x1e7bf2e)
flang-new: error: unable to execute command: Aborted (core dumped)
flang-new: error: flang frontend command failed due to signal (use -v to see invocation)
flang-new version 19.0.0git (https://github.com/llvm/llvm-project.git 823eb1a3252dd773f9c4d92093591f1b39ac27d4)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/compiler-explorer/clang-llvmflang-trunk-20240418/bin
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to