[flang-commits] [flang] Reapply "[flang] Improve debug info for functions." with regression fixed. (PR #90484)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Tue Apr 30 15:18:28 PDT 2024
klausler wrote:
With this small test program:
```
complex*16 expct
abserror = cdabs(expct)
end
```
this patch is causing `flang-new -g t.f90` to crash now with
```
flang-new: /home/pklausler/llvm-project/mlir/lib/IR/Types.cpp:129: unsigned int mlir::Type::getIntOrFloatBitWidth() const: Assertion `isIntOrFloat() && "only integers and floats have a bitwidth"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new -fc1 -triple x86_64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu x86-64 -debug-info-kind=standalone -resource-dir /local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/lib/clang/19 -mframe-pointer=all -o /tmp/t-92844f.o -x f95-cpp-input t.f90
#0 0x000055cbd84925cb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x23785cb)
#1 0x000055cbd848fb34 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f8ff3506520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007f8ff355a9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007f8ff3506476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007f8ff34ec7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00007f8ff34ec71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#7 0x00007f8ff34fde96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#8 0x000055cbdd2f8b5c mlir::Type::getIntOrFloatBitWidth() const (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x71deb5c)
#9 0x000055cbda042d40 fir::DebugTypeGenerator::convertType(mlir::Type, mlir::LLVM::DIFileAttr, mlir::LLVM::DIScopeAttr, mlir::Location) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x3f28d40)
#10 0x000055cbda01e39e (anonymous namespace)::AddDebugInfoPass::runOnOperation()::'lambda'(mlir::func::FuncOp)::operator()(mlir::func::FuncOp) const AddDebugInfo.cpp:0:0
#11 0x000055cbda01e864 _ZN4llvm12function_refIFvPN4mlir9OperationEEE11callback_fnIZNS1_6detail4walkILNS1_9WalkOrderE1ENS1_15ForwardIteratorEZN12_GLOBAL__N_116AddDebugInfoPass14runOnOperationEvEUlNS1_4func6FuncOpEE_SE_vEENSt9enable_ifIXaantsrSt11disjunctionIJSt7is_sameIT2_S3_ESI_ISJ_PNS1_6RegionEESI_ISJ_PNS1_5BlockEEEE5valuesrSI_IT3_vE5valueESS_E4typeES3_OT1_EUlS3_E_EEvlS3_ AddDebugInfo.cpp:0:0
#12 0x000055cbda01ec4a (anonymous namespace)::AddDebugInfoPass::runOnOperation() AddDebugInfo.cpp:0:0
#13 0x000055cbdd0adcb1 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x6f93cb1)
#14 0x000055cbdd0ae10a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x6f9410a)
#15 0x000055cbdd0ae8d4 mlir::PassManager::run(mlir::Operation*) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x6f948d4)
#16 0x000055cbd8c721c5 Fortran::frontend::CodeGenAction::generateLLVMIR() (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x2b581c5)
#17 0x000055cbd8c75188 Fortran::frontend::CodeGenAction::executeAction() (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x2b5b188)
#18 0x000055cbd84d06dd Fortran::frontend::FrontendAction::execute() (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x23b66dd)
#19 0x000055cbd84bffdb Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x23a5fdb)
#20 0x000055cbd84d66c5 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x23bc6c5)
#21 0x000055cbd7fa4c90 fc1_main(llvm::ArrayRef<char const*>, char const*) (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x1e8ac90)
#22 0x000055cbd7ed8b08 main (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x1dbeb08)
#23 0x00007f8ff34edd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#24 0x00007f8ff34ede40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#25 0x000055cbd7fa39c5 _start (/local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin/flang-new+0x1e899c5)
flang-new: error: unable to execute command: Aborted
flang-new: error: flang frontend command failed due to signal (use -v to see invocation)
flang-new version 19.0.0git (git at github.com:klausler/llvm-project.git c665e49911a0f029564a816b71dce5bf1c81f3a9)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/home/pklausler/install/llvm-project/x86/gcc/9.3.0/Release/static/bin
Build config: +assertions
flang-new: note: diagnostic msg:
```
Please repair or revert this change post haste, it is blocking development for me and others at Nvidia.
https://github.com/llvm/llvm-project/pull/90484
More information about the flang-commits
mailing list