[PATCH] Ensure DW_TAG_base_type has DW_AT_name (PR debug/42278)
Jakub Jelinek
jakub@redhat.com
Thu May 13 14:28:00 GMT 2010
On Thu, May 13, 2010 at 06:53:49AM -0700, H.J. Lu wrote:
> On Tue, May 11, 2010 at 4:14 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > Here is an updated patch:
> >
> > 2010-05-12  Jakub Jelinek  <jakub@redhat.com>
> >
> > Â Â Â Â PR debug/42278
> > Â Â Â Â * dwarf2out.c (base_type_die): Don't add name attribute here.
> > Â Â Â Â (modified_type_die): Instead of sizetype use
> > Â Â Â Â its underlying original type. Â If a DW_TAG_base_type doesn't
> > Â Â Â Â have name added, add __unknown__.
> > Â Â Â Â (dwarf2out_imported_module_or_decl_1): Don't call base_type_die,
> > Â Â Â Â always call force_type_die instead.
> >
>
> This caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44104
Fixed thusly, committed as obvious. Why it hasn't appeared when I've been
regtesting the patch is still a mystery to me.
2010-05-13 Jakub Jelinek <jakub@redhat.com>
PR debug/44104
* dwarf2out.c (modified_type_die): Don't dereference mod_type_die
if it is NULL.
--- gcc/dwarf2out.c.jj 2010-05-13 12:21:21.000000000 +0200
+++ gcc/dwarf2out.c 2010-05-13 16:08:56.000000000 +0200
@@ -12322,7 +12322,7 @@ modified_type_die (tree type, int is_con
add_name_attribute (mod_type_die, IDENTIFIER_POINTER (name));
}
/* This probably indicates a bug. */
- else if (mod_type_die->die_tag == DW_TAG_base_type)
+ else if (mod_type_die && mod_type_die->die_tag == DW_TAG_base_type)
add_name_attribute (mod_type_die, "__unknown__");
if (qualified_type)
Jakub
More information about the Gcc-patches
mailing list