[LLVMbugs] [Bug 11010] New: Assertion failure while parsing drawobj.c from SPEC CINT2000's 255.vortex
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 26 00:09:37 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11010
Summary: Assertion failure while parsing drawobj.c from SPEC
CINT2000's 255.vortex
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: willdtz at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7351)
--> (http://llvm.org/bugs/attachment.cgi?id=7351)
Reduced test case.
Present as of r140514, bisected first bad commit to r140457.
Reduced testcase attached.
Assertion failure (can re-run with Debug build if needed):
clang -c test.c -o /dev/null
clang: /home/will/llvm/tot/llvm/include/llvm/Support/Casting.h:194: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::ConstantArrayType, Y = clang::QualType, typename llvm::cast_retty<To,
From>::ret_type = const clang::ConstantArrayType*]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.
0 clang 0x0000000001ccf22f
1 clang 0x0000000001ccfd6a
2 libpthread.so.0 0x00007f113bdbcb60
3 libc.so.6 0x00007f113b099fc5 gsignal + 53
4 libc.so.6 0x00007f113b09b976 abort + 390
5 libc.so.6 0x00007f113b0928a5 __assert_fail + 245
6 clang 0x0000000000b34a26
7 clang 0x0000000000b4784e
8 clang 0x0000000000b3e8a7
9 clang 0x0000000000b3f157
10 clang 0x0000000000b3f98d
11 clang 0x0000000000b41b5a
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, clang::ASTMultiPtr<clang::Expr*>,
clang::QualType*) + 2522
12 clang 0x0000000000a5dd11
clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) +
2689
13 clang 0x000000000096d11e
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 718
14 clang 0x0000000000971c73
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 675
15 clang 0x0000000000976943
clang::Parser::ParseSimpleDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, bool,
clang::Parser::ForRangeInit*) + 755
16 clang 0x0000000000976b23
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 163
17 clang 0x0000000000945b9f
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 447
18 clang 0x0000000000943139
clang::Parser::ParseCompoundStatementBody(bool) + 1721
19 clang 0x0000000000943ae8
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 168
20 clang 0x000000000096241e
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 2094
21 clang 0x00000000009721ec
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2076
22 clang 0x000000000095c77b
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 155
23 clang 0x000000000095ce7e
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 734
24 clang 0x000000000095f9c8
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 3224
25 clang 0x000000000095ff32
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 162
26 clang 0x00000000009312cd clang::ParseAST(clang::Sema&, bool) + 221
27 clang 0x00000000007da0a4 clang::CodeGenAction::ExecuteAction() +
68
28 clang 0x00000000006b62d5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 373
29 clang 0x000000000069c6b9
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1385
30 clang 0x0000000000690e04 cc1_main(char const**, char const**, char
const*, void*) + 868
31 clang 0x000000000069b4e3 main + 7811
32 libc.so.6 0x00007f113b084e5d __libc_start_main + 253
33 clang 0x00000000006908c9
Stack dump:
0. Program arguments:
/home/will/llvm/tot/llvm-objects/Release+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.21.53.0.2.20110804 -momit-leaf-frame-pointer -coverage-file /dev/null
-resource-dir
/home/will/llvm/tot/llvm-objects/Release+Asserts/bin/../lib/clang/3.0
-fmodule-cache-path /var/tmp/clang-module-cache -cxx-isystem
/usr/lib64/qt/include -ferror-limit 19 -fmessage-length 116
-fdiagnostics-show-option -fcolor-diagnostics -o /dev/null -x c test.c
1. test.c:3:35: current parser token ';'
2. test.c:2:12: parsing function body 'foo'
3. test.c:2:12: in compound statement ('{}')
clang: error: unable to execute command: Aborted
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list