Closed
Description
Version of flang-new : 19.0.0(dd7386d85f11cf6ad911b9827c7018fb08c6c205)/AArch64
If type complex
is used with expression-stmt
in atomic
construct, the compilation terminates abnormally.
If type complex
is changed to type real
or integer
, the compilation terminates normally.
The following are the test program, Flang-new, Gfortran and ifort compilation result.
omp_PARALLEL_001c_21.f90:
program main
complex(kind=8)::ca
ca = (0.0,0.0)
!$omp parallel
!$omp atomic
ca = ca + (1.0,0.0)
!$omp end parallel
write(6,*) "pass"
end
$ flang-new -fopenmp omp_PARALLEL_001c_21.f90
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/fomp_complex/omp_PARALLEL_001c_21.f90":3:7): no atomic update operation with region argument as operand found inside atomic.update region
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/fomp_complex/omp_PARALLEL_001c_21.f90":3:7): LLVM Translation failed for operation: omp.atomic.update
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /lustre/home/ohno/LLVM_20240219/release/bin/flang-new -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -fopenmp -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 -mframe-pointer=non-leaf -o /tmp/omp_PARALLEL_001c_21-1219a1.o -x f95-cpp-input omp_PARALLEL_001c_21.f90
#0 0x00000000040220b0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x40220b0)
#1 0x000000000401ffb8 llvm::sys::RunSignalHandlers() (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x401ffb8)
#2 0x000000000402013c SignalHandler(int) Signals.cpp:0:0
#3 0x00004000240a07a0 (linux-vdso.so.1+0x7a0)
#4 0x0000000007362a0c llvm::CodeExtractor::findAllocas(llvm::CodeExtractorAnalysisCache const&, llvm::SetVector<llvm::Value*, llvm::SmallVector<llvm::Value*, 0u>, llvm::DenseSet<llvm::Value*, llvm::DenseMapInfo<llvm::Value*, void>>, 0u>&, llvm::SetVector<llvm::Value*, llvm::SmallVector<llvm::Value*, 0u>, llvm::DenseSet<llvm::Value*, llvm::DenseMapInfo<llvm::Value*, void>>, 0u>&, llvm::BasicBlock*&) const (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x7362a0c)
#5 0x0000000006f86a78 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) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x6f86a78)
#6 0x00000000056ba024 (anonymous namespace)::OpenMPDialectLLVMIRTranslationInterface::convertOperation(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) const OpenMPToLLVMIRTranslation.cpp:0:0
#7 0x0000000005d43f18 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x5d43f18)
#8 0x0000000005d4ca5c mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x5d4ca5c)
#9 0x0000000005d4d708 mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x5d4d708)
#10 0x0000000005d4e0d8 mlir::LLVM::ModuleTranslation::convertFunctions() (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x5d4e0d8)
#11 0x0000000005d5249c mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x5d5249c)
#12 0x000000000466ae80 Fortran::frontend::CodeGenAction::generateLLVMIR() (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x466ae80)
#13 0x000000000466d038 Fortran::frontend::CodeGenAction::executeAction() (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x466d038)
#14 0x000000000405706c Fortran::frontend::FrontendAction::execute() (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x405706c)
#15 0x000000000404b8dc Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x404b8dc)
#16 0x000000000405bce8 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x405bce8)
#17 0x0000000003c6b3d0 fc1_main(llvm::ArrayRef<char const*>, char const*) (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x3c6b3d0)
#18 0x0000000003bf3f70 main (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x3bf3f70)
#19 0x0000400024534384 __libc_start_main (/lib64/libc.so.6+0x24384)
#20 0x0000000003c6a24c _start (/lustre/home/ohno/LLVM_20240219/release/bin/flang-new+0x3c6a24c)
flang-new: error: unable to execute command: Segmentation fault (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 dd7386d85f11cf6ad911b9827c7018fb08c6c205)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /lustre/home/ohno/LLVM_20240219/release/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/omp_PARALLEL_001c_21-1c710e
flang-new: note: diagnostic msg: /tmp/omp_PARALLEL_001c_21-1c710e.sh
flang-new: note: diagnostic msg:
********************
$
$ cat /tmp/omp_PARALLEL_001c_21-1c710e
#line "./omp_PARALLEL_001c_21.f90" 1
program main
complex(kind=8)::ca
ca = (0.0,0.0)
!$omp parallel
!$omp atomic
ca = ca + (1.0,0.0)
!$omp end parallel
write(6,*) "pass"
end
$
$ cat /tmp/omp_PARALLEL_001c_21-1c710e.sh
# Crash reproducer for clang version 19.0.0git (https://github.com/llvm/llvm-project.git dd7386d85f11cf6ad911b9827c7018fb08c6c205)
# Driver args: "-fopenmp" "-L/lustre/home/ohno/LLVM_20240219/release/lib" "omp_PARALLEL_001c_21.f90"
# Original command: "/lustre/home/ohno/LLVM_20240219/release/bin/flang-new" "-fc1" "-triple" "aarch64-unknown-linux-gnu" "-emit-obj" "-fopenmp" "-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" "-mframe-pointer=non-leaf" "-o" "/tmp/omp_PARALLEL_001c_21-1219a1.o" "-x" "f95-cpp-input" "omp_PARALLEL_001c_21.f90"
"/lustre/home/ohno/LLVM_20240219/release/bin/flang-new" "-fc1" "-triple" "aarch64-unknown-linux-gnu" "-emit-obj" "-fopenmp" "-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" "-mframe-pointer=non-leaf" "-x" "f95-cpp-input" "omp_PARALLEL_001c_21-1c710e"
$
$ gfortran -fopenmp omp_PARALLEL_001c_21.f90
$
$ ifort -qopenmp -diag-disable=10448 omp_PARALLEL_001c_21.f90
$
Metadata
Metadata
Assignees
Type
Projects
Status
Done