[PATCH] Ensure DW_TAG_base_type has DW_AT_name (PR debug/42278)

Jakub Jelinek jakub@redhat.com
Tue May 11 22:56:00 GMT 2010


On Tue, May 11, 2010 at 06:10:52PM -0400, Jason Merrill wrote:
> On 05/11/2010 03:59 PM, Jakub Jelinek wrote:
> >I think the TYPE_PRECISION check might be necessary, at least set_sizetype
> >has some code to change precision from the base type.
> 
> The precision code in set_sizetype is for bitsizetype, not sizetype.

Oops, you're right.

> >And, it seems many frontends have NULL TYPE_NAME on sizetype, or
> >it is an identifier, not a TYPE_DECL.
> 
> Right, I figured the first three lines would stay.

Ok.

> >BTW, it seems there is another call to base_type_die in
> >dwarf2out_imported_module_or_decl_1:
> >       if (is_base_type (TREE_TYPE (decl)))
> >         at_import_die = base_type_die (TREE_TYPE (decl));
> 
> Well, that seems clearly wrong.  We shouldn't generate an additional
> DIE for 'int' just because we have a using-declaration for an int
> typedef.

If I understand it right, the problem was that with
the base type force_type_die crashed, because at that
time force_type_die called gen_type_die instead of modified_type_die.
This got fixed by PR34895 though, so I believe it is now always safe
to call force_type_die here.

	Jakub



More information about the Gcc-patches mailing list