[LLVMbugs] [Bug 4281] New: Making typedefs of const stuff makes Clang crash
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu May 28 14:09:11 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4281
Summary: Making typedefs of const stuff makes Clang crash
Product: clang
Version: unspecified
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ed at 80386.nl
CC: llvmbugs at cs.uiuc.edu
Blocks: 3696
The following C code makes Clang die:
typedef struct {
int i;
} something;
typedef const something const_something;
something fail(void);
int
main(int argc, char *argv[])
{
const_something R = fail();
}
cc -O2 -pipe llvm-crash.c -o llvm-crash
Assertion failed: (CGF.getContext().typesAreCompatible(
E->getSubExpr()->getType().getUnqualifiedType(),
E->getType().getUnqualifiedType()) && "Implicit cast types must be
compatible"), function VisitImplicitCastExpr, file
llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp, line 181.
Stack dump:
0. Program arguments: /usr/bin/../libexec/clang-cc -triple
x86_64-undermydesk-freebsd8.0 -S -disable-free -main-file-name llvm-crash.c
--relocation-model static --disable-fp-elim --unwind-tables=1 --mcpu=x86-64
--fmath-errno=1 -O2 -fdiagnostics-show-option -o /tmp/cc-k2ODg6.s -x c
llvm-crash.c
1. <eof> parser at end of file
2. llvm-crash.c:10:1: LLVM IR generation of declaration 'main'
3. llvm-crash.c:11:1: LLVM IR generation of compound statement ('{}')
--
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