[LLVMbugs] [Bug 5381] New: Assertion failed instead of proper diagnostic on offsetof of incomplete type
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Nov 3 07:35:15 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=5381
Summary: Assertion failed instead of proper diagnostic on
offsetof of incomplete type
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: parser
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: abramobagnara at tin.it
CC: llvmbugs at cs.uiuc.edu
The attached one line C program shows the problem:
$ llvm_new/Debug/bin/clang-cc bug_clang.c
clang-cc: SemaLookup.cpp:817: bool
clang::Sema::LookupQualifiedName(clang::Sema::LookupResult&,
clang::DeclContext*, clang::DeclarationName,
clang::Sema::LookupNameKind, bool): Assertion `(!isa<TagDecl>(LookupCtx)
|| LookupCtx->isDependentContext() ||
cast<TagDecl>(LookupCtx)->isDefinition() ||
Context.getTypeDeclType(cast<TagDecl>(LookupCtx))->getAs<TagType>()
->isBeingDefined()) && "Declaration context must already be complete!"'
failed.
0 clang-cc 0x00000000010b55af
1 clang-cc 0x00000000010b5b0e
2 libpthread.so.0 0x00000036aa80f0f0
3 libc.so.6 0x00000036a9c32f05 gsignal + 53
4 libc.so.6 0x00000036a9c34a73 abort + 387
5 libc.so.6 0x00000036a9c2bef9 __assert_fail + 233
6 clang-cc 0x000000000076397c
7 clang-cc 0x0000000000732d8a
8 clang-cc 0x00000000008a645b
9 clang-cc 0x00000000008a8acd
10 clang-cc 0x00000000008a9dc7
11 clang-cc 0x00000000008a310e
12 clang-cc 0x00000000008a4237
13 clang-cc 0x00000000008bae4a
14 clang-cc 0x00000000008be769
15 clang-cc 0x00000000008becc6
16 clang-cc 0x000000000088c578
17 clang-cc 0x000000000088d07b
18 clang-cc 0x000000000088d6bf
19 clang-cc 0x000000000088d773
20 clang-cc 0x00000000006b50b7
21 clang-cc 0x000000000042c63b
22 clang-cc 0x000000000042d79b main + 3320
23 libc.so.6 0x00000036a9c1e576 __libc_start_main + 230
24 clang-cc 0x0000000000424bc9
Stack dump:
0. Program arguments: llvm_new/Debug/bin/clang-cc bug_clang.c
1. bug_clang.c:7:34: current parser token ';'
2. bug_clang.c:6:18: parsing function body 'f'
3. bug_clang.c:6:18: in compound statement ('{}')
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