# HG changeset patch # User Christian Kamm # Date 1232714463 -3600 # Node ID 01d9ece9982aecda261d4e55353ae0e4f7d13af4 # Parent 493d425627333abf7b19632fe4134cdf9d3e2480 Fix bug #177 by not attempting to define composite debug info for forward-declared structs. diff -r 493d42562733 -r 01d9ece9982a gen/todebug.cpp --- a/gen/todebug.cpp Fri Jan 23 10:13:27 2009 +0100 +++ b/gen/todebug.cpp Fri Jan 23 13:41:03 2009 +0100 @@ -439,6 +439,11 @@ } assert(sd); + // if we don't know the aggregate's size, we don't know enough about it + // to provide debug info. probably a forward-declared struct? + if (sd->sizeok == 0) + return NULL; + IrStruct* ir = sd->ir.irStruct; assert(ir); if (ir->dwarfComposite)