Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

icpx ICE Segmentation fault

vzecca
Beginner
347 Views

icpx icpxerr9.C
PLEASE submit a bug report to https://software.intel.com/en-us/support/priority-support and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang++ -cc1 -triple x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name icpxerr9.C -mrelocation-model static -fveclib=SVML -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /opt/intel/oneapi/compiler/2021.1.2/linux/lib/clang/12.0.0 -I/opt/intel/oneapi/dpcpp-ct/2021.1.1/include -I/opt/intel/oneapi/dnnl/2021.1.1/cpu_dpcpp_gpu_dpcpp/lib -I/opt/intel/oneapi/ccl/2021.1.1/include/cpu_gpu_dpcpp -I/opt/intel/oneapi/vpl/2021.1.1/include -I/opt/intel/oneapi/ipp/2021.1.1/include -I/opt/intel/oneapi/tbb/2021.1.1/env/../include -I/opt/intel/oneapi/ippcp/2021.1.1/include -I/opt/intel/oneapi/dev-utilities/2021.1.1/include -I/opt/intel/oneapi/mkl/latest/include -I/opt/intel/oneapi/mpi/2021.1.1//include -I/opt/intel/oneapi/dal/2021.1.1/include -I/opt/intel/oneapi/dpl/2021.1.2/linux/include -I/opt/intel/oneapi/compiler/2021.1.2/linux/include -cxx-isystem /opt/intel/oneapi/clck/2021.1.1/include -internal-isystem /opt/intel/oneapi/compiler/2021.1.2/linux/bin/../compiler/include -internal-isystem /home/vitti/local/gcc-150321-full/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1 -internal-isystem /home/vitti/local/gcc-150321-full/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1/x86_64-pc-linux-gnu -internal-isystem /home/vitti/local/gcc-150321-full/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1/backward -internal-isystem /usr/local/include -internal-isystem /opt/intel/oneapi/compiler/2021.1.2/linux/lib/clang/12.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -fdeprecated-macro -fdebug-compilation-dir /home/vitti/f95/cc -ferror-limit 19 -disable-cpudispatch-ifuncs -fheinous-gnu-extensions -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -fintel-compatibility -mllvm -disable-hir-generate-mkl-call -mllvm -intel-libirc-allowed -mllvm -loopopt=0 -mllvm -enable-lv -o /tmp/icpxerr9-eee149.o -x c++ icpxerr9.C
1. <eof> parser at end of file
2. icpxerr9.C:9:6: LLVM IR generation of declaration 'g'
3. icpxerr9.C:9:6: Generating code for declaration 'g'
#0 0x000055a771fff8f7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x17788f7)
#1 0x000055a771ffe0b0 llvm::sys::RunSignalHandlers() (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x17770b0)
#2 0x000055a771fffbc1 SignalHandler(int) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x1778bc1)
#3 0x00001525b4f30960 __restore_rt (/usr/lib64/libpthread.so.0+0x13960)
#4 0x000055a77502bf22 (anonymous namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x47a4f22)
#5 0x000055a77474b8c9 clang::StmtVisitorBase<std::__1::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ec48c9)
#6 0x000055a77474b1b0 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ec41b0)
#7 0x000055a77500ad12 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4783d12)
#8 0x000055a77500aefb clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(clang::Expr const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4783efb)
#9 0x000055a774feb05a clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList&, clang::Expr const*, clang::QualType) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x476405a)
#10 0x000055a774feabcf clang::CodeGen::CodeGenFunction::EmitCallArgs(clang::CodeGen::CallArgList&, llvm::ArrayRef<clang::QualType>, llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr const* const, clang::Stmt const* const> >, clang::CodeGen::CodeGenFunction::AbstractCallee, unsigned int, clang::CodeGen::CodeGenFunction::EvaluationOrder) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4763bcf)
#11 0x000055a774fd1e36 void clang::CodeGen::CodeGenFunction::EmitCallArgs<clang::FunctionProtoType>(clang::CodeGen::CallArgList&, clang::FunctionProtoType const*, llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr const* const, clang::Stmt const* const> >, clang::CodeGen::CodeGenFunction::AbstractCallee, unsigned int, clang::CodeGen::CodeGenFunction::EvaluationOrder) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x474ae36)
#12 0x000055a77501e608 commonEmitCXXMemberOrOperatorCall(clang::CodeGen::CodeGenFunction&, clang::CXXMethodDecl const*, llvm::Value*, llvm::Value*, clang::QualType, clang::CallExpr const*, clang::CodeGen::CallArgList&, clang::CodeGen::CallArgList*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4797608)
#13 0x000055a77501e355 clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(clang::CXXMethodDecl const*, clang::CodeGen::CGCallee const&, clang::CodeGen::ReturnValueSlot, llvm::Value*, llvm::Value*, clang::QualType, clang::CallExpr const*, clang::CodeGen::CallArgList*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4797355)
#14 0x000055a77501f73c clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(clang::CallExpr const*, clang::CXXMethodDecl const*, clang::CodeGen::ReturnValueSlot, bool, clang::NestedNameSpecifier*, bool, clang::Expr const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x479873c)
#15 0x000055a775020a91 clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(clang::CXXOperatorCallExpr const*, clang::CXXMethodDecl const*, clang::CodeGen::ReturnValueSlot) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4799a91)
#16 0x000055a77502bf6b (anonymous namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x47a4f6b)
#17 0x000055a77474b4de clang::StmtVisitorBase<std::__1::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ec44de)
#18 0x000055a77474b8c9 clang::StmtVisitorBase<std::__1::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ec48c9)
#19 0x000055a77474b1b0 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ec41b0)
#20 0x000055a77500ad12 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4783d12)
#21 0x000055a77500aefb clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(clang::Expr const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4783efb)
#22 0x000055a774feb05a clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList&, clang::Expr const*, clang::QualType) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x476405a)
#23 0x000055a774feabcf clang::CodeGen::CodeGenFunction::EmitCallArgs(clang::CodeGen::CallArgList&, llvm::ArrayRef<clang::QualType>, llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr const* const, clang::Stmt const* const> >, clang::CodeGen::CodeGenFunction::AbstractCallee, unsigned int, clang::CodeGen::CodeGenFunction::EvaluationOrder) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4763bcf)
#24 0x000055a775019de4 clang::CodeGen::CodeGenFunction::EmitCall(clang::QualType, clang::CodeGen::CGCallee const&, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, llvm::Value*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4792de4)
#25 0x000055a77501976a clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x479276a)
#26 0x000055a77502bf6b (anonymous namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x47a4f6b)
#27 0x000055a77474b94e clang::StmtVisitorBase<std::__1::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ec494e)
#28 0x000055a77474b1b0 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ec41b0)
#29 0x000055a77500ad12 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4783d12)
#30 0x000055a77500acb7 clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4783cb7)
#31 0x000055a774f900bd clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x47090bd)
#32 0x000055a774f946b4 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x470d6b4)
#33 0x000055a774fa3151 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x471c151)
#34 0x000055a77473ec96 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3eb7c96)
#35 0x000055a774fb2fde clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x472bfde)
#36 0x000055a774fb16a4 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x472a6a4)
#37 0x000055a774742553 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3ebb553)
#38 0x000055a7747d7175 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f50175)
#39 0x000055a7747d6f64 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f4ff64)
#40 0x000055a7747db275 clang::ParseAST(clang::Sema&, bool, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f54275)
#41 0x000055a77523db17 clang::CodeGenAction::ExecuteAction() (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x49b6b17)
#42 0x000055a77513b81e clang::FrontendAction::Execute() (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x48b481e)
#43 0x000055a7750e1a12 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x485aa12)
#44 0x000055a775152502 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x48cb502)
#45 0x000055a774a3aa9c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41b3a9c)
#46 0x000055a774a39721 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41b2721)
#47 0x000055a774a38d72 main (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41b1d72)
#48 0x00001525b4d73b75 __libc_start_main (/usr/lib64/libc.so.6+0x27b75)
#49 0x000055a774a363e2 _start (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41af3e2)
clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
Intel(R) oneAPI DPC++ Compiler 2021.1.2 (2020.10.0.1214)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2021.1.2/linux/bin
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/icpxerr9-020ec0.cpp
clang++: note: diagnostic msg: /tmp/icpxerr9-020ec0.sh
clang++: note: diagnostic msg:

********************
[vitti cc]$cat /tmp/icpxerr9-020ec0.cpp
# 1 "<built-in>"
# 1 "icpxerr9.C"
// icpx ICE in ScalarExprEmitter::VisitCallExpr
template<typename = int>
void f(const char* a =
([](int = []{ static int i; return 42; }()) {
static int i;
return "";
}()));

void g()
{
f();
}
[vitti cc]$cat /tmp/icpxerr9-020ec0.sh
# Crash reproducer for Intel(R) oneAPI DPC++ Compiler 2021.1.2 (2020.10.0.1214)
# Driver args: "--driver-mode=g++" "--intel" "icpxerr9.C"
# Original command: "/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang++" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "--mrelax-relocations" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "icpxerr9.C" "-mrelocation-model" "static" "-fveclib=SVML" "-mframe-pointer=none" "-fmath-errno" "-fno-rounding-math" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-fno-split-dwarf-inlining" "-debugger-tuning=gdb" "-resource-dir" "/opt/intel/oneapi/compiler/2021.1.2/linux/lib/clang/12.0.0" "-I/opt/intel/oneapi/dpcpp-ct/2021.1.1/include" "-I/opt/intel/oneapi/dnnl/2021.1.1/cpu_dpcpp_gpu_dpcpp/lib" "-I/opt/intel/oneapi/ccl/2021.1.1/include/cpu_gpu_dpcpp" "-I/opt/intel/oneapi/vpl/2021.1.1/include" "-I/opt/intel/oneapi/ipp/2021.1.1/include" "-I/opt/intel/oneapi/tbb/2021.1.1/env/../include" "-I/opt/intel/oneapi/ippcp/2021.1.1/include" "-I/opt/intel/oneapi/dev-utilities/2021.1.1/include" "-I/opt/intel/oneapi/mkl/latest/include" "-I/opt/intel/oneapi/mpi/2021.1.1//include" "-I/opt/intel/oneapi/dal/2021.1.1/include" "-I/opt/intel/oneapi/dpl/2021.1.2/linux/include" "-I/opt/intel/oneapi/compiler/2021.1.2/linux/include" "-cxx-isystem" "/opt/intel/oneapi/clck/2021.1.1/include" "-internal-isystem" "/opt/intel/oneapi/compiler/2021.1.2/linux/bin/../compiler/include" "-internal-isystem" "/home/vitti/local/gcc-150321-full/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1" "-internal-isystem" "/home/vitti/local/gcc-150321-full/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1/x86_64-pc-linux-gnu" "-internal-isystem" "/home/vitti/local/gcc-150321-full/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1/backward" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/opt/intel/oneapi/compiler/2021.1.2/linux/lib/clang/12.0.0/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-O2" "-fdeprecated-macro" "-fdebug-compilation-dir" "/home/vitti/f95/cc" "-ferror-limit" "19" "-disable-cpudispatch-ifuncs" "-fheinous-gnu-extensions" "-fgnuc-version=4.2.1" "-fcxx-exceptions" "-fexceptions" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-fintel-compatibility" "-mllvm" "-disable-hir-generate-mkl-call" "-mllvm" "-intel-libirc-allowed" "-mllvm" "-loopopt=0" "-mllvm" "-enable-lv" "-o" "/tmp/icpxerr9-eee149.o" "-x" "c++" "icpxerr9.C"
"/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang++" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "--mrelax-relocations" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "icpxerr9.C" "-mrelocation-model" "static" "-fveclib=SVML" "-mframe-pointer=none" "-fmath-errno" "-fno-rounding-math" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-fno-split-dwarf-inlining" "-debugger-tuning=gdb" "-cxx-isystem" "/opt/intel/oneapi/clck/2021.1.1/include" "-O2" "-fdeprecated-macro" "-ferror-limit" "19" "-disable-cpudispatch-ifuncs" "-fheinous-gnu-extensions" "-fgnuc-version=4.2.1" "-fcxx-exceptions" "-fexceptions" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-fintel-compatibility" "-mllvm" "-disable-hir-generate-mkl-call" "-mllvm" "-intel-libirc-allowed" "-mllvm" "-loopopt=0" "-mllvm" "-enable-lv" "-x" "c++" "icpxerr9-020ec0.cpp"

Labels (1)
0 Kudos
2 Replies
RahulV_intel
Moderator
320 Views

Hi,


Thanks for reporting the bug. The test code crashes with ICPX. We are working internally on this and will get back to you.


Regards,

Rahul


Viet_H_Intel
Moderator
314 Views

I've reported this bug to our Developer.

Thank you for the test case.


Reply