<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95977>95977</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang][OpenMP] Regression in test-suite::gfortran-regression-compile-regression__gomp__appendix-a__a_12_1_f90.test
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ceseo
</td>
</tr>
</table>
<pre>
Commit c0cba5198155dba246ddd5764f57595d9bbbddef seems to be breaking the gfortran testsuite:
```
******************** TEST 'test-suite :: Fortran/gfortran/regression/gomp/appendix-a/gfortran-regression-compile-regression__gomp__appendix-a__a_12_1_f90.test' FAILED ********************
/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/tools/timeit-target --timeout 7200 --limit-core 0 --limit-cpu 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --redirect-input /dev/null --summary /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gomp/appendix-a/Output/gfortran-regression-compile-regression__gomp__appendix-a__a_12_1_f90.test.time /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gomp/appendix-a/../../..//dummy
/usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gomp/appendix-a/../../..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gomp/appendix-a/gfortran-regression-compile-regression__gomp__appendix-a__a_12_1_f90.out
0a1,50
> error: loc("/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/test-suite/Fortran/gfortran/regression/gomp/appendix-a/a.12.1.f90":11:9): operation with block successors must terminate its parent block
> error: Lowering to LLVM IR failed
> flang-new: ../llvm/mlir/lib/IR/Block.cpp:244: Operation *mlir::Block::getTerminator(): Assertion `mightHaveTerminator()' failed.
> 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-sve-vla/stage1.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 +outline-atomics -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -module-dir /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gomp/appendix-a/gfortran-regression-compile-regression__gomp__appendix-a__a_12_1_f90.wd -fopenmp -resource-dir /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/.. -mframe-pointer=non-leaf -o a.12.1.o -x f95-cpp-input /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/test-suite/Fortran/gfortran/regression/gomp/appendix-a/a.12.1.f90
> #0 0x0000aaaac84b4d20 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x5e64d20)
> #1 0x0000aaaac84b2bf0 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x5e62bf0)
> #2 0x0000aaaac84b5588 SignalHandler(int) Signals.cpp:0:0
> #3 0x0000ffffb33c39d0 (linux-vdso.so.1+0x9d0)
> #4 0x0000ffffb2f16d78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
> #5 0x0000ffffb2f03aac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
> #6 0x0000ffffb2f10490 __assert_fail_base /build/glibc-Q8DG8B/glibc-2.31/assert/assert.c:89:7
> #7 0x0000ffffb2f104f4 (/lib/aarch64-linux-gnu/libc.so.6+0x2d4f4)
> #8 0x0000aaaaccb5682c (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0xa50682c)
> #9 0x0000aaaac9c36ab4 convertOmpOpRegions(mlir::Region&, llvm::StringRef, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&, mlir::LogicalResult&, llvm::SmallVectorImpl<llvm::PHINode*>*) OpenMPToLLVMIRTranslation.cpp:0:0
> #10 0x0000aaaac9c3a4f8 void llvm::function_ref<void (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint)>::callback_fn<convertOmpParallel(mlir::omp::ParallelOp, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&)::$_1>(long, llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint) OpenMPToLLVMIRTranslation.cpp:0:0
> #11 0x0000aaaacbbd1114 llvm::OpenMPIRBuilder::createParallel(llvm::OpenMPIRBuilder::LocationDescription const&, llvm::IRBuilderBase::InsertPoint, llvm::function_ref<void (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint)>, llvm::function_ref<llvm::IRBuilderBase::InsertPoint (llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint, llvm::Value&, llvm::Value&, llvm::Value*&)>, std::function<void (llvm::IRBuilderBase::InsertPoint)>, llvm::Value*, llvm::Value*, llvm::omp::ProcBindKind, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x9581114)
> #12 0x0000aaaac9c2b5a8 convertHostOrTargetOperation(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) OpenMPToLLVMIRTranslation.cpp:0:0
> #13 0x0000aaaaca76b1b4 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x811b1b4)
> #14 0x0000aaaaca76bcdc mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x811bcdc)
> #15 0x0000aaaaca76eedc mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x811eedc)
> #16 0x0000aaaaca770dc4 mlir::LLVM::ModuleTranslation::convertFunctions() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x8120dc4)
> #17 0x0000aaaaca772eac mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x8122eac)
> #18 0x0000aaaac84f8934 Fortran::frontend::CodeGenAction::generateLLVMIR() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x5ea8934)
> #19 0x0000aaaac84fb724 Fortran::frontend::CodeGenAction::executeAction() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x5eab724)
> #20 0x0000aaaac84edbfc Fortran::frontend::FrontendAction::execute() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x5e9dbfc)
> #21 0x0000aaaac84dc260 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x5e8c260)
> #22 0x0000aaaac84f1cb0 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x5ea1cb0)
> #23 0x0000aaaac6fb00d4 fc1_main(llvm::ArrayRef<char const*>, char const*) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x49600d4)
> #24 0x0000aaaac6fae96c main (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x495e96c)
> #25 0x0000ffffb2f03e10 __libc_start_main /build/glibc-Q8DG8B/glibc-2.31/csu/../csu/libc-start.c:342:3
> #26 0x0000aaaac6fae404 _start (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/flang-new+0x495e404)
> 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 f808abf508a6b890b40fc2594ea36ce896bb1f37)
> Target: aarch64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin
> Build config: +assertions
> 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/a-d41356
> flang-new: note: diagnostic msg: /tmp/a-d41356.sh
> flang-new: note: diagnostic msg:
>
> ********************
\ No newline at end of file
+ /usr/bin/diff /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gomp/appendix-a/../../..//gfortran-compile-empty.reference.out /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/test/sandbox/build/Fortran/gfortran/regression/gomp/appendix-a/gfortran-regression-compile-regression__gomp__appendix-a__a_12_1_f90.out
********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWllP5DoW_jXhxUqUOEslDzwUS3Wj4V4YmrnzWHLsk8K3HTuynQLm14_spHaaSwO31BqNBKnE2znfWb0RY_hCApwG-VmQX5yQ3j4ofUrBgDqpFXs-PVdtyy2iMa1JnlRlkuesJjgrGGP5pMiafJJXOavqumYMGmQAWoOsQjWgWgP5zuUC2QdAi0Zpq4lEFow1PbcQpNMgvgji1bOIx7_hE7__D91ffrtHAZ44WqEnh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