--- dwarf2read.c.cleanup 2004-04-15 13:23:39.000000000 -0700 +++ dwarf2read.c 2004-04-15 13:36:10.000000000 -0700 @@ -3144,6 +3144,9 @@ read_structure_type (struct die_info *di TYPE_LENGTH (type) = 0; } + if (die_is_declaration (die, cu)) + TYPE_FLAGS (type) |= TYPE_FLAG_STUB; + /* We need to add the type field to the die immediately so we don't infinitely recurse when dealing with pointers to the structure type within the structure itself. */ @@ -3240,11 +3243,6 @@ read_structure_type (struct die_info *di do_cleanups (back_to); } - else - { - /* No children, must be stub. */ - TYPE_FLAGS (type) |= TYPE_FLAG_STUB; - } processing_current_prefix = previous_prefix; if (back_to != NULL)