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

icpx ICE in GetFullTypeForDeclarator

vzecca
Beginner
431 Views

icpx icpxerr5.C
free(): invalid pointer
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 icpxerr5.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/icpxerr5-61217e.o -x c++ icpxerr5.C
1. icpxerr5.C:4:49: current parser token ';'
2. icpxerr5.C:2:22: parsing struct/union/class body 'A'
#0 0x00005602ddef78f7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x17788f7)
#1 0x00005602ddef60b0 llvm::sys::RunSignalHandlers() (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x17770b0)
#2 0x00005602ddef7bc1 SignalHandler(int) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x1778bc1)
#3 0x0000152ce908b960 __restore_rt (/usr/lib64/libpthread.so.0+0x13960)
#4 0x0000152ce8ee4292 raise (/usr/lib64/libc.so.6+0x3d292)
#5 0x0000152ce8ecd8a4 abort (/usr/lib64/libc.so.6+0x268a4)
#6 0x0000152ce8f26cd7 __libc_message (/usr/lib64/libc.so.6+0x7fcd7)
#7 0x0000152ce8f2e94c (/usr/lib64/libc.so.6+0x8794c)
#8 0x0000152ce8f30e69 (/usr/lib64/libc.so.6+0x89e69)
#9 0x00005602e088f532 GetFullTypeForDeclarator((anonymous namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4110532)
#10 0x00005602e087fa0f clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4100a0f)
#11 0x00005602e125c43c clang::Sema::HandleField(clang::Scope*, clang::RecordDecl*, clang::SourceLocation, clang::Declarator&, clang::Expr*, clang::InClassInitStyle, clang::AccessSpecifier) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4add43c)
#12 0x00005602e07bdbf4 clang::Sema::ActOnCXXMemberDeclarator(clang::Scope*, clang::AccessSpecifier, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>, clang::Expr*, clang::VirtSpecifiers const&, clang::InClassInitStyle) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x403ebf4)
#13 0x00005602e06f88e7 clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f798e7)
#14 0x00005602e06fabe2 clang::Parser::ParseCXXClassMemberDeclarationWithPragmas(clang::AccessSpecifier&, clang::Parser::ParsedAttributesWithRange&, clang::TypeSpecifierType, clang::Decl*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f7bbe2)
#15 0x00005602e06f6614 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int, clang::Decl*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f77614)
#16 0x00005602e06f3b3c clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::Parser::ParsedAttributesWithRange&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f74b3c)
#17 0x00005602e06e4053 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f65053)
#18 0x00005602e070cdf0 clang::Parser::ParseSingleDeclarationAfterTemplate(clang::DeclaratorContext, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f8ddf0)
#19 0x00005602e070c801 clang::Parser::ParseTemplateDeclarationOrSpecialization(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f8d801)
#20 0x00005602e070c39c clang::Parser::ParseDeclarationStartingWithTemplate(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f8d39c)
#21 0x00005602e06e32e4 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, clang::SourceLocation*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f642e4)
#22 0x00005602e06d5eda clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f56eda)
#23 0x00005602e06d568c clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f5668c)
#24 0x00005602e11c744a clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x4a4844a)
#25 0x00005602e06d3258 clang::ParseAST(clang::Sema&, bool, bool) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x3f54258)
#26 0x00005602e1135b17 clang::CodeGenAction::ExecuteAction() (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x49b6b17)
#27 0x00005602e103381e clang::FrontendAction::Execute() (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x48b481e)
#28 0x00005602e0fd9a12 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x485aa12)
#29 0x00005602e104a502 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x48cb502)
#30 0x00005602e0932a9c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41b3a9c)
#31 0x00005602e0931721 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41b2721)
#32 0x00005602e0930d72 main (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41b1d72)
#33 0x0000152ce8eceb75 __libc_start_main (/usr/lib64/libc.so.6+0x27b75)
#34 0x00005602e092e3e2 _start (/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang+++0x41af3e2)
clang++: error: unable to execute command: Aborted (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/icpxerr5-5c068b.cpp
clang++: note: diagnostic msg: /tmp/icpxerr5-5c068b.sh
clang++: note: diagnostic msg:

********************
[vitti cc]$cat /tmp/icpxerr5-5c068b.cpp
# 1 "<built-in>"
# 1 "icpxerr5.C"
// icpx ICE in GetFullTypeForDeclarator
template<typename T> struct A
{
int x[sizeof(T)] __attribute((vector_size(8)));
};
[vitti cc]$cat /tmp/icpxerr5-5c068b.sh
# Crash reproducer for Intel(R) oneAPI DPC++ Compiler 2021.1.2 (2020.10.0.1214)
# Driver args: "--driver-mode=g++" "--intel" "icpxerr5.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" "icpxerr5.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/icpxerr5-61217e.o" "-x" "c++" "icpxerr5.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" "icpxerr5.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++" "icpxerr5-5c068b.cpp"

0 Kudos
5 Replies
PrasanthD_intel
Moderator
384 Views

Hi Vittorio,


Thanks for reporting the ICE.

We are looking into it and will get back to you soon.


Regards

Prasanth


Viet_H_Intel
Moderator
377 Views

Vector types work differently in LLVM compares to GNU. If you compile the test case with clang++ you would get the same error.

Thanks,

Viet 

 

Viet_H_Intel
Moderator
371 Views

I am going to close this thread as it is not an issue with icpx/clang++.

Thanks,


vzecca
Beginner
359 Views

I believe icpx should issue a meaningful and helpful error message as in

invalid vector element type 'int [sizeof(T)]' from clang++ version 12.

It should not crash with a request of a bug report.

Viet_H_Intel
Moderator
350 Views

Yes, you will see this message with the next update version.

t1.cpp:3:31: error: invalid vector element type 'int [sizeof(T)]'
int x[sizeof(T)] __attribute((vector_size(8)));

Thanks,

Reply