[llvm-bugs] [Bug 36531] New: Assertion `TypeSize == Context.getTypeSize(Context.CharTy) && "Unhandled vector element size in vector compare"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 26 17:46:51 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36531

            Bug ID: 36531
           Summary: Assertion `TypeSize ==
                    Context.getTypeSize(Context.CharTy) && "Unhandled
                    vector element size in vector compare"' failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: shlei930 at gmail.com
                CC: llvm-bugs at lists.llvm.org

$ clang-trunk -v
clang version 7.0.0 (trunk 326083)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

$ clang-trunk abc.c
clang-7.0:
/home/suhua/compilers/trunk/llvm/tools/clang/lib/Sema/SemaExpr.cpp:10124:
clang::QualType clang::Sema::GetSignedVectorType(clang::QualType): Assertion
`TypeSize == Context.getTypeSize(Context.CharTy) && "Unhandled vector element
size in vector compare"' failed.
#0 0x000000000232082a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x232082a)
#1 0x000000000231e89e llvm::sys::RunSignalHandlers()
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x231e89e)
#2 0x000000000231ea02 SignalHandler(int)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x231ea02)
#3 0x00007f3db2892390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f3db15fd428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f3db15ff02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f3db15f5bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007f3db15f5c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x00000000032b7ab5
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x32b7ab5)
#9 0x00000000032dcebd
clang::Sema::CheckVectorCompareOperands(clang::ActionResult<clang::Expr*,
true>&, clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation,
clang::BinaryOperatorKind)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x32dcebd)
#10 0x00000000032dff84
clang::Sema::CheckCompareOperands(clang::ActionResult<clang::Expr*, true>&,
clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation,
clang::BinaryOperatorKind, bool)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x32dff84)
#11 0x00000000032e29e2 clang::Sema::CreateBuiltinBinOp(clang::SourceLocation,
clang::BinaryOperatorKind, clang::Expr*, clang::Expr*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x32e29e2)
#12 0x00000000032e3537 clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x32e3537)
#13 0x00000000032e3af6 clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x32e3af6)
#14 0x0000000002f6f36c
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f6f36c)
#15 0x0000000002f6efac
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f6efac)
#16 0x0000000002f4047f
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f4047f)
#17 0x0000000002f5154e clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f5154e)
#18 0x0000000002f54714
clang::Parser::ParseSimpleDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f54714)
#19 0x0000000002f549cd
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f549cd)
#20 0x0000000002fa8528
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2fa8528)
#21 0x0000000002fa867e
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2fa867e)
#22 0x0000000002fab7af clang::Parser::ParseCompoundStatementBody(bool)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2fab7af)
#23 0x0000000002fad53f clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2fad53f)
#24 0x0000000002f32f29
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f32f29)
#25 0x0000000002f51a57 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f51a57)
#26 0x0000000002f2ff02
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f2ff02)
#27 0x0000000002f306ae
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f306ae)
#28 0x0000000002f33f88
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f33f88)
#29 0x0000000002f34fc2
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f34fc2)
#30 0x0000000002f35192
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f35192)
#31 0x0000000002f2d193 clang::ParseAST(clang::Sema&, bool, bool)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2f2d193)
#32 0x0000000002d0323f clang::CodeGenAction::ExecuteAction()
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2d0323f)
#33 0x0000000002896216 clang::FrontendAction::Execute()
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2896216)
#34 0x000000000286b61e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x286b61e)
#35 0x000000000292a972
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x292a972)
#36 0x0000000000c8f268 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0xc8f268)
#37 0x0000000000c13b71 main
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0xc13b71)
#38 0x00007f3db15e8830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#39 0x0000000000c89f19 _start
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0xc89f19)
Stack dump:
0.      Program arguments: /home/suhua/compilers/trunk/root-clang/bin/clang-7.0
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name abc.c -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debugger-tuning=gdb -resource-dir
/home/suhua/compilers/trunk/root-clang/lib/clang/7.0.0 -c-isystem . -c-isystem
/usr/local/include/csmith-2.3.0/ -c-isystem
/home/suhua/media_disk/home/klee/include/klee -internal-isystem
/usr/local/include -internal-isystem
/home/suhua/compilers/trunk/root-clang/lib/clang/7.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/suhua/Documents/VPT/reduce/bug12 -ferror-limit 19
-fmessage-length 140 -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/abc-650d60.o -x c abc.c
1.      abc.c:3:21: current parser token ';'
2.      abc.c:1:11: parsing function body 'fn1'
3.      abc.c:1:11: in compound statement ('{}')
clang-7.0: error: unable to execute command: Aborted
clang-7.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 7.0.0 (trunk 326083)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-7.0: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-7.0: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7.0: note: diagnostic msg: /tmp/abc-838add.c
clang-7.0: note: diagnostic msg: /tmp/abc-838add.sh
clang-7.0: note: diagnostic msg:

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

$ cat abc.c
int fn1() {
  __attribute__((__vector_size__(sizeof(__int128)))) __int128 v64u128_2 =
      0 != v64u128_2;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180227/621c0908/attachment.html>


More information about the llvm-bugs mailing list