llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Flang crash upon running internal_dummy_2.f08 gfortran regression test

Open omjavaid opened this issue 2 years ago • 16 comments

Flang crash on gfortran/regression internal_dummy_2.f08 test on various AArch64 machines. This test was enabled by recent commit 82c07c75. If the said feature is not implemented flang should report an appropriate message.

******************** TEST 'test-suite :: Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.test' FAILED ********************

/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/tools/timeit-target --limit-core 0 --limit-cpu 7200 --timeout 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --redirect-input /dev/null --summary /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/Output/gfortran-regression-compile-regression__internal_dummy_2_f08.test.time /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//dummy
/usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out
0a1,49
> flang-new: warning: -lpgmath: 'linker' input unused [-Wunused-command-line-argument]
> unimplemented operand
> UNREACHABLE executed at /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/llvm/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:6102!
> PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
> Stack dump:
> 0.	Program arguments: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +neon -target-feature +v8a -module-dir /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.wd -mframe-pointer=non-leaf -o internal_dummy_2.o -x f95-cpp-input /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/test-suite/Fortran/gfortran/regression/internal_dummy_2.f08
> 1.	Running pass 'Function Pass Manager' on module 'FIRModule'.
> 2.	Running pass 'AArch64 Instruction Selection' on function '@_QQmain'
>  #0 0x0000aaaad080a000 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b4000)
>  #1 0x0000aaaad0807d70 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b1d70)
>  #2 0x0000aaaad080a8f8 SignalHandler(int) Signals.cpp:0:0
>  #3 0x0000ffffa10d9598 (linux-vdso.so.1+0x598)
>  #4 0x0000ffffa0bf0d78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
>  #5 0x0000ffffa0bddaac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
>  #6 0x0000aaaad0784ec8 (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x292eec8)
>  #7 0x0000aaaacf528e38 llvm::AArch64TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) const (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x16d2e38)
>  #8 0x0000aaaad270e160 (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) LegalizeDAG.cpp:0:0
>  #9 0x0000aaaad270d674 llvm::SelectionDAG::Legalize() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x48b7674)
> #10 0x0000aaaad27d5af8 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497faf8)
> #11 0x0000aaaad27d3a70 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497da70)
> #12 0x0000aaaad27d0970 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497a970)
> #13 0x0000aaaad2bc8bc0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x4d72bc0)
> #14 0x0000aaaad4a348c8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bde8c8)
> #15 0x0000aaaad4a3c634 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6be6634)
> #16 0x0000aaaad4a35248 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bdf248)
> #17 0x0000aaaad0a11038 Fortran::frontend::CodeGenAction::executeAction() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x2bbb038)
> #18 0x0000aaaad083e91c Fortran::frontend::FrontendAction::execute() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29e891c)
> #19 0x0000aaaad082d5f4 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29d75f4)
> #20 0x0000aaaad08427f0 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29ec7f0)
> #21 0x0000aaaacf3a5530 fc1_main(llvm::ArrayRef<char const*>, char const*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154f530)
> #22 0x0000aaaacf3a45a4 main (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154e5a4)
> #23 0x0000ffffa0bdde10 __libc_start_main /build/glibc-Q8DG8B/glibc-2.31/csu/../csu/libc-start.c:342:3
> #24 0x0000aaaacf3a3918 _start (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154d918)
> 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 18.0.0git (https://github.com/llvm/llvm-project.git fc0fdd1ae20062e4d77c1b7ffc5b06773c752815)
> Target: aarch64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin
> 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/internal_dummy_2-7c482f
> flang-new: note: diagnostic msg: /tmp/internal_dummy_2-7c482f.sh
> flang-new: note: diagnostic msg: 
> 
> ********************
\ No newline at end of file

+ /usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out

********************

omjavaid avatar Jan 04 '24 09:01 omjavaid

@llvm/issue-subscribers-flang-driver

Author: Omair Javaid (omjavaid)

Flang crash on gfortran/regression internal_dummy_2.f08 test on various AArch64 machines. This test was enabled by recent commit 82c07c75. If the said feature is not implemented flang should report an appropriate message.
******************** TEST 'test-suite :: Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.test' FAILED ********************

/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/tools/timeit-target --limit-core 0 --limit-cpu 7200 --timeout 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --redirect-input /dev/null --summary /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/Output/gfortran-regression-compile-regression__internal_dummy_2_f08.test.time /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//dummy
/usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out
0a1,49
&gt; flang-new: warning: -lpgmath: 'linker' input unused [-Wunused-command-line-argument]
&gt; unimplemented operand
&gt; UNREACHABLE executed at /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/llvm/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:6102!
&gt; PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
&gt; Stack dump:
&gt; 0.	Program arguments: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +neon -target-feature +v8a -module-dir /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.wd -mframe-pointer=non-leaf -o internal_dummy_2.o -x f95-cpp-input /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/test-suite/Fortran/gfortran/regression/internal_dummy_2.f08
&gt; 1.	Running pass 'Function Pass Manager' on module 'FIRModule'.
&gt; 2.	Running pass 'AArch64 Instruction Selection' on function '@<!-- -->_QQmain'
&gt;  #<!-- -->0 0x0000aaaad080a000 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b4000)
&gt;  #<!-- -->1 0x0000aaaad0807d70 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b1d70)
&gt;  #<!-- -->2 0x0000aaaad080a8f8 SignalHandler(int) Signals.cpp:0:0
&gt;  #<!-- -->3 0x0000ffffa10d9598 (linux-vdso.so.1+0x598)
&gt;  #<!-- -->4 0x0000ffffa0bf0d78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
&gt;  #<!-- -->5 0x0000ffffa0bddaac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
&gt;  #<!-- -->6 0x0000aaaad0784ec8 (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x292eec8)
&gt;  #<!-- -->7 0x0000aaaacf528e38 llvm::AArch64TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&amp;) const (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x16d2e38)
&gt;  #<!-- -->8 0x0000aaaad270e160 (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) LegalizeDAG.cpp:0:0
&gt;  #<!-- -->9 0x0000aaaad270d674 llvm::SelectionDAG::Legalize() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x48b7674)
&gt; #<!-- -->10 0x0000aaaad27d5af8 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497faf8)
&gt; #<!-- -->11 0x0000aaaad27d3a70 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497da70)
&gt; #<!-- -->12 0x0000aaaad27d0970 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497a970)
&gt; #<!-- -->13 0x0000aaaad2bc8bc0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x4d72bc0)
&gt; #<!-- -->14 0x0000aaaad4a348c8 llvm::FPPassManager::runOnFunction(llvm::Function&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bde8c8)
&gt; #<!-- -->15 0x0000aaaad4a3c634 llvm::FPPassManager::runOnModule(llvm::Module&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6be6634)
&gt; #<!-- -->16 0x0000aaaad4a35248 llvm::legacy::PassManagerImpl::run(llvm::Module&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bdf248)
&gt; #<!-- -->17 0x0000aaaad0a11038 Fortran::frontend::CodeGenAction::executeAction() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x2bbb038)
&gt; #<!-- -->18 0x0000aaaad083e91c Fortran::frontend::FrontendAction::execute() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29e891c)
&gt; #<!-- -->19 0x0000aaaad082d5f4 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29d75f4)
&gt; #<!-- -->20 0x0000aaaad08427f0 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29ec7f0)
&gt; #<!-- -->21 0x0000aaaacf3a5530 fc1_main(llvm::ArrayRef&lt;char const*&gt;, char const*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154f530)
&gt; #<!-- -->22 0x0000aaaacf3a45a4 main (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154e5a4)
&gt; #<!-- -->23 0x0000ffffa0bdde10 __libc_start_main /build/glibc-Q8DG8B/glibc-2.31/csu/../csu/libc-start.c:342:3
&gt; #<!-- -->24 0x0000aaaacf3a3918 _start (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154d918)
&gt; flang-new: error: unable to execute command: Aborted
&gt; flang-new: error: flang frontend command failed due to signal (use -v to see invocation)
&gt; flang-new version 18.0.0git (https://github.com/llvm/llvm-project.git fc0fdd1ae20062e4d77c1b7ffc5b06773c752815)
&gt; Target: aarch64-unknown-linux-gnu
&gt; Thread model: posix
&gt; InstalledDir: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin
&gt; flang-new: note: diagnostic msg: 
&gt; ********************
&gt; 
&gt; PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
&gt; Preprocessed source(s) and associated run script(s) are located at:
&gt; flang-new: note: diagnostic msg: /tmp/internal_dummy_2-7c482f
&gt; flang-new: note: diagnostic msg: /tmp/internal_dummy_2-7c482f.sh
&gt; flang-new: note: diagnostic msg: 
&gt; 
&gt; ********************
\ No newline at end of file

+ /usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out

********************

llvmbot avatar Jan 04 '24 09:01 llvmbot

@llvm/issue-subscribers-flang-frontend

Author: Omair Javaid (omjavaid)

Flang crash on gfortran/regression internal_dummy_2.f08 test on various AArch64 machines. This test was enabled by recent commit 82c07c75. If the said feature is not implemented flang should report an appropriate message.
******************** TEST 'test-suite :: Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.test' FAILED ********************

/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/tools/timeit-target --limit-core 0 --limit-cpu 7200 --timeout 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --redirect-input /dev/null --summary /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/Output/gfortran-regression-compile-regression__internal_dummy_2_f08.test.time /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//dummy
/usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out
0a1,49
&gt; flang-new: warning: -lpgmath: 'linker' input unused [-Wunused-command-line-argument]
&gt; unimplemented operand
&gt; UNREACHABLE executed at /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/llvm/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:6102!
&gt; PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
&gt; Stack dump:
&gt; 0.	Program arguments: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +neon -target-feature +v8a -module-dir /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.wd -mframe-pointer=non-leaf -o internal_dummy_2.o -x f95-cpp-input /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/test-suite/Fortran/gfortran/regression/internal_dummy_2.f08
&gt; 1.	Running pass 'Function Pass Manager' on module 'FIRModule'.
&gt; 2.	Running pass 'AArch64 Instruction Selection' on function '@<!-- -->_QQmain'
&gt;  #<!-- -->0 0x0000aaaad080a000 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b4000)
&gt;  #<!-- -->1 0x0000aaaad0807d70 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b1d70)
&gt;  #<!-- -->2 0x0000aaaad080a8f8 SignalHandler(int) Signals.cpp:0:0
&gt;  #<!-- -->3 0x0000ffffa10d9598 (linux-vdso.so.1+0x598)
&gt;  #<!-- -->4 0x0000ffffa0bf0d78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
&gt;  #<!-- -->5 0x0000ffffa0bddaac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
&gt;  #<!-- -->6 0x0000aaaad0784ec8 (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x292eec8)
&gt;  #<!-- -->7 0x0000aaaacf528e38 llvm::AArch64TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&amp;) const (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x16d2e38)
&gt;  #<!-- -->8 0x0000aaaad270e160 (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) LegalizeDAG.cpp:0:0
&gt;  #<!-- -->9 0x0000aaaad270d674 llvm::SelectionDAG::Legalize() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x48b7674)
&gt; #<!-- -->10 0x0000aaaad27d5af8 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497faf8)
&gt; #<!-- -->11 0x0000aaaad27d3a70 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497da70)
&gt; #<!-- -->12 0x0000aaaad27d0970 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497a970)
&gt; #<!-- -->13 0x0000aaaad2bc8bc0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x4d72bc0)
&gt; #<!-- -->14 0x0000aaaad4a348c8 llvm::FPPassManager::runOnFunction(llvm::Function&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bde8c8)
&gt; #<!-- -->15 0x0000aaaad4a3c634 llvm::FPPassManager::runOnModule(llvm::Module&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6be6634)
&gt; #<!-- -->16 0x0000aaaad4a35248 llvm::legacy::PassManagerImpl::run(llvm::Module&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bdf248)
&gt; #<!-- -->17 0x0000aaaad0a11038 Fortran::frontend::CodeGenAction::executeAction() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x2bbb038)
&gt; #<!-- -->18 0x0000aaaad083e91c Fortran::frontend::FrontendAction::execute() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29e891c)
&gt; #<!-- -->19 0x0000aaaad082d5f4 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29d75f4)
&gt; #<!-- -->20 0x0000aaaad08427f0 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29ec7f0)
&gt; #<!-- -->21 0x0000aaaacf3a5530 fc1_main(llvm::ArrayRef&lt;char const*&gt;, char const*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154f530)
&gt; #<!-- -->22 0x0000aaaacf3a45a4 main (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154e5a4)
&gt; #<!-- -->23 0x0000ffffa0bdde10 __libc_start_main /build/glibc-Q8DG8B/glibc-2.31/csu/../csu/libc-start.c:342:3
&gt; #<!-- -->24 0x0000aaaacf3a3918 _start (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154d918)
&gt; flang-new: error: unable to execute command: Aborted
&gt; flang-new: error: flang frontend command failed due to signal (use -v to see invocation)
&gt; flang-new version 18.0.0git (https://github.com/llvm/llvm-project.git fc0fdd1ae20062e4d77c1b7ffc5b06773c752815)
&gt; Target: aarch64-unknown-linux-gnu
&gt; Thread model: posix
&gt; InstalledDir: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin
&gt; flang-new: note: diagnostic msg: 
&gt; ********************
&gt; 
&gt; PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
&gt; Preprocessed source(s) and associated run script(s) are located at:
&gt; flang-new: note: diagnostic msg: /tmp/internal_dummy_2-7c482f
&gt; flang-new: note: diagnostic msg: /tmp/internal_dummy_2-7c482f.sh
&gt; flang-new: note: diagnostic msg: 
&gt; 
&gt; ********************
\ No newline at end of file

+ /usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out

********************

llvmbot avatar Jan 04 '24 09:01 llvmbot

Thanks for reporting! Could you share a reproducer and let us know which project is this commit from?

This test was enabled by recent commit 82c07c75

banach-space avatar Jan 04 '24 09:01 banach-space

This is from llvm-test-suite gfortran tests. I pushed a commit 4049776b to disable this tests. It fails on following LLVM buildbots

https://lab.llvm.org/buildbot/#/builders/198 https://lab.llvm.org/buildbot/#/builders/184 https://lab.llvm.org/buildbot/#/builders/197 https://lab.llvm.org/buildbot/#/builders/176

omjavaid avatar Jan 04 '24 09:01 omjavaid

I pushed a commit 4049776b to disable this tests.

Thanks! Would you mind sharing links to commits that you refer to? It's much easier if all the information is in one place :)

Looking at one particular failure (https://lab.llvm.org/buildbot/#/builders/184/builds/9092/steps/13/logs/FAIL__test-suite__gfortran-regression-compile-regr):

> UNREACHABLE executed at ../llvm/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:6102!

Looks like a something specific to AArch64. Do we run these tests on any other platforms?

CC @klausler who pushed 82c07c75.

banach-space avatar Jan 04 '24 10:01 banach-space

@banach-space i am not aware of all the commits from the LLVM side which should have fixed this test. @klausler might know better which Fortran features or bug fix should have fixed this tests.

omjavaid avatar Jan 04 '24 10:01 omjavaid

@banach-space i am not aware of all the commits from the LLVM side which should have fixed this test.

What I meant is sharing 82c07c75 instead of 82c07c75 ;-)

banach-space avatar Jan 04 '24 11:01 banach-space

The underlying reason for the failure is the lack of trampolines in AArch64. The basic problem is passing arguments from an outer scope through to a function pointer.

I'll come back with some supporting material in a little bit.

Leporacanthicus avatar Jan 04 '24 11:01 Leporacanthicus

This raises the issue: https://github.com/JuliaLang/julia/issues/27174

There's an RFC about support for this here: https://github.com/llvm/llvm-project/pull/66157 I pointed out the above bug in that review.

Leporacanthicus avatar Jan 04 '24 12:01 Leporacanthicus

Although that is supposed to be fixed here: https://github.com/llvm/llvm-project/pull/70267

So not entirely sure what the problem is...

Leporacanthicus avatar Jan 04 '24 13:01 Leporacanthicus

@llvm/issue-subscribers-backend-aarch64

Author: Omair Javaid (omjavaid)

Flang crash on gfortran/regression internal_dummy_2.f08 test on various AArch64 machines. This test was enabled by recent commit 82c07c75. If the said feature is not implemented flang should report an appropriate message.
******************** TEST 'test-suite :: Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.test' FAILED ********************

/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/tools/timeit-target --limit-core 0 --limit-cpu 7200 --timeout 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --redirect-input /dev/null --summary /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/Output/gfortran-regression-compile-regression__internal_dummy_2_f08.test.time /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//dummy
/usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out
0a1,49
&gt; flang-new: warning: -lpgmath: 'linker' input unused [-Wunused-command-line-argument]
&gt; unimplemented operand
&gt; UNREACHABLE executed at /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/llvm/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:6102!
&gt; PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
&gt; Stack dump:
&gt; 0.	Program arguments: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +neon -target-feature +v8a -module-dir /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.wd -mframe-pointer=non-leaf -o internal_dummy_2.o -x f95-cpp-input /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/test-suite/Fortran/gfortran/regression/internal_dummy_2.f08
&gt; 1.	Running pass 'Function Pass Manager' on module 'FIRModule'.
&gt; 2.	Running pass 'AArch64 Instruction Selection' on function '@<!-- -->_QQmain'
&gt;  #<!-- -->0 0x0000aaaad080a000 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b4000)
&gt;  #<!-- -->1 0x0000aaaad0807d70 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29b1d70)
&gt;  #<!-- -->2 0x0000aaaad080a8f8 SignalHandler(int) Signals.cpp:0:0
&gt;  #<!-- -->3 0x0000ffffa10d9598 (linux-vdso.so.1+0x598)
&gt;  #<!-- -->4 0x0000ffffa0bf0d78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
&gt;  #<!-- -->5 0x0000ffffa0bddaac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
&gt;  #<!-- -->6 0x0000aaaad0784ec8 (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x292eec8)
&gt;  #<!-- -->7 0x0000aaaacf528e38 llvm::AArch64TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&amp;) const (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x16d2e38)
&gt;  #<!-- -->8 0x0000aaaad270e160 (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) LegalizeDAG.cpp:0:0
&gt;  #<!-- -->9 0x0000aaaad270d674 llvm::SelectionDAG::Legalize() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x48b7674)
&gt; #<!-- -->10 0x0000aaaad27d5af8 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497faf8)
&gt; #<!-- -->11 0x0000aaaad27d3a70 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497da70)
&gt; #<!-- -->12 0x0000aaaad27d0970 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x497a970)
&gt; #<!-- -->13 0x0000aaaad2bc8bc0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x4d72bc0)
&gt; #<!-- -->14 0x0000aaaad4a348c8 llvm::FPPassManager::runOnFunction(llvm::Function&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bde8c8)
&gt; #<!-- -->15 0x0000aaaad4a3c634 llvm::FPPassManager::runOnModule(llvm::Module&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6be6634)
&gt; #<!-- -->16 0x0000aaaad4a35248 llvm::legacy::PassManagerImpl::run(llvm::Module&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x6bdf248)
&gt; #<!-- -->17 0x0000aaaad0a11038 Fortran::frontend::CodeGenAction::executeAction() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x2bbb038)
&gt; #<!-- -->18 0x0000aaaad083e91c Fortran::frontend::FrontendAction::execute() (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29e891c)
&gt; #<!-- -->19 0x0000aaaad082d5f4 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&amp;) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29d75f4)
&gt; #<!-- -->20 0x0000aaaad08427f0 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x29ec7f0)
&gt; #<!-- -->21 0x0000aaaacf3a5530 fc1_main(llvm::ArrayRef&lt;char const*&gt;, char const*) (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154f530)
&gt; #<!-- -->22 0x0000aaaacf3a45a4 main (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154e5a4)
&gt; #<!-- -->23 0x0000ffffa0bdde10 __libc_start_main /build/glibc-Q8DG8B/glibc-2.31/csu/../csu/libc-start.c:342:3
&gt; #<!-- -->24 0x0000aaaacf3a3918 _start (/home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin/flang-new+0x154d918)
&gt; flang-new: error: unable to execute command: Aborted
&gt; flang-new: error: flang frontend command failed due to signal (use -v to see invocation)
&gt; flang-new version 18.0.0git (https://github.com/llvm/llvm-project.git fc0fdd1ae20062e4d77c1b7ffc5b06773c752815)
&gt; Target: aarch64-unknown-linux-gnu
&gt; Thread model: posix
&gt; InstalledDir: /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/stage2.install/bin
&gt; flang-new: note: diagnostic msg: 
&gt; ********************
&gt; 
&gt; PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
&gt; Preprocessed source(s) and associated run script(s) are located at:
&gt; flang-new: note: diagnostic msg: /tmp/internal_dummy_2-7c482f
&gt; flang-new: note: diagnostic msg: /tmp/internal_dummy_2-7c482f.sh
&gt; flang-new: note: diagnostic msg: 
&gt; 
&gt; ********************
\ No newline at end of file

+ /usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/test/sandbox/build/Fortran/gfortran/regression/gfortran-regression-compile-regression__internal_dummy_2_f08.out

********************

llvmbot avatar Jan 04 '24 15:01 llvmbot

Tom Eccles gave me an all-clear for aarch64, so I don't know what went wrong there. I should probably just stop upstreaming test enablements to llvm-test-suite.

What's left to be done for this bug?

klausler avatar Jan 04 '24 16:01 klausler

Tom Eccles gave me an all-clear for aarch64, so I don't know what went wrong there. I should probably just stop upstreaming test enablements to llvm-test-suite.

That's a bit extreme. You are certainly not the first, unlikely the last to do an "Oops, I broke something I couldn't test locally".

What's left to be done for this bug?

I first thought it was as easy as "it's not been implemented", but there seems to be code there to solve this. See PR mentioned above.

I haven't looked into the details, as I've got another important task to work on. The PR above says it should work on Linux, will not work on Windows or MacOS - but this is a Linux build, so shouldn't be a problem that it doesn't work on other OSes.

I may be able to take a look after I've got my current work sorted out (at least as far as trying to narrow down the underlying problem a bit more closely).

Leporacanthicus avatar Jan 04 '24 17:01 Leporacanthicus

Although that is supposed to be fixed here: #70267

So not entirely sure what the problem is...

My PR hasn't been merged yet. Someone else mentioned a while back on Phabricator that he would try another approach to solve this problem without relying on a compiler-rt dependency. I don't know the current status of that.

ceseo avatar Jan 05 '24 18:01 ceseo

Although that is supposed to be fixed here: #70267 So not entirely sure what the problem is...

My PR hasn't been merged yet. Someone else mentioned a while back on Phabricator that he would try another approach to solve this problem without relying on a compiler-rt dependency. I don't know the current status of that.

Ah, that'll be why it still fails... :) Mystery solved. It helps if you actually can read the PR page correctly, and when you (as in I) see the "Squash and merge" don't accept that as "already merged".

@klausler I'm not sure if there's a way to enable the test for only some OS/Processor (e.g. x86 & Linux only) or not. Otherwise, I guess we have to wait until the above ticket is resolved...

Leporacanthicus avatar Jan 05 '24 18:01 Leporacanthicus

@Leporacanthicus my suggestion would be to approve this PR and I'd add a comment stating that, in the future, it would be better to remove the compiler-rt dependency, like X86 does.

ceseo avatar Jan 08 '24 13:01 ceseo