[cfe-dev] Initializer assertion failure

Oliver Hunt oliver at apple.com
Thu Dec 13 14:37:58 PST 2007


Yeah that's a known issue -- i believe Anders was looking at it,  
although i'm sure no one will mind if you do :D

The problem is that the inner ILE (eg. { 0x00aa, ...} ) is  
initialised to void, and the correct type is never set.

I think there's even a fixme right before it sets the ILE type to  
void :D

--Oliver

On 13/12/2007, at 2:31 PM, Neil Booth wrote:

> I get an assert with -emit-llvm compiling
>
> typedef struct
> {
>   unsigned short a, b, c;
> } z;
>
> static const z zs[] =
> {
>   { 0x00aa, 0x00aa, 1 },
> };
>
> assertion "ILE->getType()->isArrayType() ||
> ILE->getType()->isStructureType()" failed: file "CodeGenModule.cpp",
> line 284, function "llvm::Constant* GenerateAggregateInit(const
> clang::InitListExpr*, clang::CodeGen::CodeGenModule&)"
> Abort trap
>
> Neil.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list