[cfe-dev] New crash in codegen?

Chris Lattner clattner at apple.com
Tue Feb 5 15:05:30 PST 2008


On Feb 5, 2008, at 1:01 AM, Eli Friedman wrote:

> Testcase:
>
> struct MpegEncContext;
> typedef struct MpegEncContext {int pb;} MpegEncContext;
> static void x(void) {MpegEncContext s; s.pb;}
>
> Crashes for me in codegen on trunk, but I'm not sure if it's just my
> own build...

This isn't your build, this is a regression from my patch last night.   
The basic problem here is that codegen isn't being informed of the  
decl for 'struct MpegEncContext'.  Instead, it is informed about the  
decl for MpegEncContext (a typedef) only.

We need to rethink how the parser/sema and the clients communicate,  
probably by extending ASTConsumer.  How critical is this to you?   
Steve convinced me to implement support for 2-token lookahead, would  
it be ok to defer this for a couple days?

-Chris



More information about the cfe-dev mailing list