Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

compilation error

zzz403
Beginner
631 Views
I got error when trying to compile .c file with icx-2024.2.0. Here is the command I use and the error message (I add -save-temps -v as it asked and upload those files):
 
$ icx ./icx.c -o./test -O3 -save-temps -v
 

Intel(R) oneAPI DPC++/C++ Compiler 2024.2.0 (2024.2.0.20240602)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /data/zyj/intel/oneapi/compiler/2024.2/bin/compiler
Configuration file: /data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/../icx.cfg
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 12.1
"/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang" -cc1 -triple x86_64-unknown-linux-gnu -E -dumpdir ./test- -save-temps=cwd -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name icx.c -mrelocation-model static -fveclib=SVML -faltmathlib=SVMLAltMathLibrary -mframe-pointer=none -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math -fdenormal-fp-math=preserve-sign,preserve-sign -ffp-contract=fast -fno-rounding-math -complex-range=promoted -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -mllvm -x86-enable-unaligned-vector-move=true -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/zyj/Data0/loop_transformation/fuzzing/icx_bug -v -fcoverage-compilation-dir=/home/zyj/Data0/loop_transformation/fuzzing/icx_bug -fclang-abi-compat=17 -resource-dir /data/zyj/intel/oneapi/compiler/2024.2/lib/clang/19 -internal-isystem /data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/../../opt/compiler/include -internal-isystem /data/zyj/intel/oneapi/compiler/2024.2/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -ferror-limit 19 -fheinous-gnu-extensions -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -vectorize-loops -vectorize-slp -mllvm -disable-hir-generate-mkl-call -mllvm -loopopt=1 -floopopt-pipeline=light -mllvm -intel-abi-compatible=true -D__GCC_HAVE_DWARF2_CFI_ASM=1 -fintel-compatibility -fintel-libirc-allowed -fintel-libimf-allowed -o icx.i -x c ./icx.c
clang -cc1 version 19.0.0git based upon LLVM 19.0.0git default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/../../opt/compiler/include
/data/zyj/intel/oneapi/compiler/2024.2/lib/clang/19/include
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
"/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang" -cc1 -triple x86_64-unknown-linux-gnu -S -dumpdir ./test- -save-temps=cwd -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name icx.c -mrelocation-model static -fveclib=SVML -faltmathlib=SVMLAltMathLibrary -mframe-pointer=none -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math -fdenormal-fp-math=preserve-sign,preserve-sign -ffp-contract=fast -fno-rounding-math -complex-range=promoted -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -mllvm -x86-enable-unaligned-vector-move=true -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/zyj/Data0/loop_transformation/fuzzing/icx_bug -v -fcoverage-compilation-dir=/home/zyj/Data0/loop_transformation/fuzzing/icx_bug -fclang-abi-compat=17 -resource-dir /data/zyj/intel/oneapi/compiler/2024.2/lib/clang/19 -O3 -ferror-limit 19 -fheinous-gnu-extensions -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -vectorize-loops -vectorize-slp -mllvm -disable-hir-generate-mkl-call -mllvm -loopopt=1 -floopopt-pipeline=light -mllvm -intel-abi-compatible=true -D__GCC_HAVE_DWARF2_CFI_ASM=1 -fintel-compatibility -fintel-libirc-allowed -fintel-libimf-allowed -o icx.s -x cpp-output icx.i
clang -cc1 version 19.0.0git based upon LLVM 19.0.0git default target x86_64-unknown-linux-gnu
#include "..." search starts here:
End of search list.
PLEASE append the compiler options "-save-temps -v", rebuild the application to get the full command which is failing and submit a bug report to https://software.intel.com/en-us/support/priority-support which includes the failing command, input files for the command and the crash backtrace (if any).
Stack dump:
0. Program arguments: /data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang -cc1 -triple x86_64-unknown-linux-gnu -S -dumpdir ./test- -save-temps=cwd -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name icx.c -mrelocation-model static -fveclib=SVML -faltmathlib=SVMLAltMathLibrary -mframe-pointer=none -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math -fdenormal-fp-math=preserve-sign,preserve-sign -ffp-contract=fast -fno-rounding-math -complex-range=promoted -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -mllvm -x86-enable-unaligned-vector-move=true -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/zyj/Data0/loop_transformation/fuzzing/icx_bug -v -fcoverage-compilation-dir=/home/zyj/Data0/loop_transformation/fuzzing/icx_bug -fclang-abi-compat=17 -resource-dir /data/zyj/intel/oneapi/compiler/2024.2/lib/clang/19 -O3 -ferror-limit 19 -fheinous-gnu-extensions -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -vectorize-loops -vectorize-slp -mllvm -disable-hir-generate-mkl-call -mllvm -loopopt=1 -floopopt-pipeline=light -mllvm -intel-abi-compatible=true -D__GCC_HAVE_DWARF2_CFI_ASM=1 -fintel-compatibility -fintel-libirc-allowed -fintel-libimf-allowed -o icx.s -x cpp-output icx.i
1. <eof> parser at end of file
2. Optimizer
#0 0x000055a8426f9463 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x5f28463)
#1 0x000055a8426f8240 llvm::sys::RunSignalHandlers() (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x5f27240)
#2 0x000055a8426f99cb SignalHandler(int) Signals.cpp:0:0
#3 0x00007fd0ef4ce520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000055a8410d3448 (anonymous namespace)::CGVisitor::getSymbaseAlloca(unsigned int, llvm::Type*, llvm::loopopt::HLRegion*) HIRCodeGen.cpp:0:0
#5 0x000055a8410d3273 (anonymous namespace)::CGVisitor::HIRSCEVExpander::visitUnknown(llvm::SCEVUnknown const*) HIRCodeGen.cpp:0:0
#6 0x000055a8405c766b llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true>, false, false>) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x3df666b)
#7 0x000055a8410d2f7f (anonymous namespace)::CGVisitor::getBlobValue(long, unsigned int, llvm::Type*) HIRCodeGen.cpp:0:0
#8 0x000055a8410d17ea (anonymous namespace)::CGVisitor::visitCanonExpr(llvm::loopopt::CanonExpr*) HIRCodeGen.cpp:0:0
#9 0x000055a8410e68b8 llvm::loopopt::HIRVisitor<(anonymous namespace)::CGVisitor, llvm::Value*>::visit(llvm::loopopt::HLNode*) HIRCodeGen.cpp:0:0
#10 0x000055a8410e5bca (anonymous namespace)::CGVisitor::visitIf(llvm::loopopt::HLIf*, llvm::Value*, llvm::AllocaInst*, llvm::MDNode*) HIRCodeGen.cpp:0:0
#11 0x000055a8410e6322 llvm::loopopt::HIRVisitor<(anonymous namespace)::CGVisitor, llvm::Value*>::visit(llvm::loopopt::HLNode*) HIRCodeGen.cpp:0:0
#12 0x000055a8410e69ea llvm::loopopt::HIRVisitor<(anonymous namespace)::CGVisitor, llvm::Value*>::visit(llvm::loopopt::HLNode*) HIRCodeGen.cpp:0:0
#13 0x000055a8410e70e7 llvm::loopopt::HIRVisitor<(anonymous namespace)::CGVisitor, llvm::Value*>::visit(llvm::loopopt::HLNode*) HIRCodeGen.cpp:0:0
#14 0x000055a8409ee9e9 llvm::loopopt::HIRCodeGenPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x421d9e9)
#15 0x000055a8409ee1dd llvm::detail::PassModel<llvm::Function, llvm::loopopt::HIRCodeGenPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#16 0x000055a8409f69e5 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x42259e5)
#17 0x000055a8409f674d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) X86CodeGenPassBuilder.cpp:0:0
#18 0x000055a8409f3aad llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x4222aad)
#19 0x000055a8409f388d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) X86CodeGenPassBuilder.cpp:0:0
#20 0x000055a8409eff5a llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x421ef5a)
#21 0x000055a84170c3dd (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>&, std::__1::unique_ptr<llvm::ToolOutputFile, std::__1::default_delete<llvm::ToolOutputFile>>&) BackendUtil.cpp:0:0
#22 0x000055a840e6cfcf clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x469bfcf)
#23 0x000055a840ef465a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) CodeGenAction.cpp:0:0
#24 0x000055a840800e4d clang::ParseAST(clang::Sema&, bool, bool) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x402fe4d)
#25 0x000055a841557248 clang::CodeGenAction::ExecuteAction() (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x4d86248)
#26 0x000055a84155a2ba clang::FrontendAction::Execute() (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x4d892ba)
#27 0x000055a841559e00 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x4d88e00)
#28 0x000055a84169710e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x4ec610e)
#29 0x000055a8413f89df cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x4c279df)
#30 0x000055a8412029f5 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#31 0x000055a8413fbf0b clang_main(int, char**, llvm::ToolContext const&) (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x4c2af0b)
#32 0x000055a841083695 main (/data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/clang+0x48b2695)
#33 0x00007fd0ef4b5d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#34 0x00007fd0ef4b5e40 call_init ./csu/../csu/libc-start.c:128:20
#35 0x00007fd0ef4b5e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#36 0x000055a841be569a _start /localdisk2/test/toolchain-cross/src/glibc/csu/../sysdeps/x86_64/start.S:122:0
icx: error: unable to execute command: Segmentation fault (core dumped)
icx: error: clang frontend command failed due to signal (use -v to see invocation)
Intel(R) oneAPI DPC++/C++ Compiler 2024.2.0 (2024.2.0.20240602)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /data/zyj/intel/oneapi/compiler/2024.2/bin/compiler
Configuration file: /data/zyj/intel/oneapi/compiler/2024.2/bin/compiler/../icx.cfg
icx: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
icx: note: diagnostic msg: /tmp/icx-3b9f8d02ba/icx-7181f2.c
icx: note: diagnostic msg: /tmp/icx-3b9f8d02ba/icx-7181f2.sh
icx: note: diagnostic msg:

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



Here is the kernel part I extract from my code:
#define N 16
#define M 10
    for (int i = 0; i < N; i++) {
        for (int j = 1; j < min(i,M+1); j++) {
            A[j-1] = 2;
        }
        for (int k = 1; k < min(i,M+1); k++) {
            A[k-1] = 3;
        }
    }

I found that the error disappears when I set "N" to 15. What's wrong with it?
0 Kudos
1 Reply
Viet_H_Intel
Moderator
534 Views

Thanks for reporting this issue. I've escalated it to our Compiler Engineering team. 

0 Kudos
Reply