<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/76927>76927</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Flang crash upon running internal_dummy_2.f08 gfortran regression test
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:driver
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
omjavaid
</td>
</tr>
</table>
<pre>
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
********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm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