[LLVMbugs] [Bug 3730] New: llvm-gcc crash with incomplete enum type
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Mar 4 20:30:49 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3730
Summary: llvm-gcc crash with incomplete enum type
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu
Testcase:
enum y b(void);
struct x {enum y (*test)(void);} z = {b};
enum y {AAA,BBB};
int a() { return z.test(); }
cc1: Instructions.cpp:2164: static llvm::Instruction::CastOps
llvm::CastInst::getCastOpcode(const llvm::Value*, bool, const llvm::Type*,
bool): Assertion `SrcTy->isFirstClassType() && DestTy->isFirstClassType() &&
"Only first class types are castable!"' failed.
<stdin>: In function ‘a’:
<stdin>:4: internal compiler error: Aborted
Another similar testcase:
enum y b(void);
struct x {enum y (*test)(void);} z = {b};
enum y {AAA,BBB};
enum y b(void) { return BBB; }
cc1: Function.cpp:164: llvm::Function::Function(const llvm::FunctionType*,
llvm::GlobalValue::LinkageTypes, const std::string&, llvm::Module*): Assertion
`FunctionType::isValidReturnType(getReturnType()) &&
!isa<OpaqueType>(getReturnType()) && "invalid return type"' failed.
<stdin>: In function ‘b’:
<stdin>:4: internal compiler error: Aborted
These are contrived testcases I came up with while comparing the output of
llvm-gcc and clang for incomplete function types, so probably not a serious
issue, but it might be worth looking at.
--
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