This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch dwarf]: PR/47209 Segfault in should_emit_struct_debug


On Tue, Jan 11, 2011 at 9:58 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hello,
>
> following patch fixes reported segfault at
>
> ChangeLog
>
> 2011-01-11 ?Kai Tietz
>
> ? ? ? ? ?PR debug/47209
> ? ? ? ? ?* dwarfout2.c (should_emit_struct_debug): Use TYPE_MAIN_VARIANT
> ? ? ? ? ?of type.
>
> Tested for x86_64-pc-linux-gnu and x86_64-pc-mingw32. Ok for apply?
>
> Regards,
> Kai
>
> --
>
> Index: dwarf2out.c
> ===================================================================
> --- dwarf2out.c (revision 168679)
> +++ dwarf2out.c (working copy)
> @@ -619,7 +619,7 @@
> ? if (criterion == DINFO_STRUCT_FILE_ANY)
> ? ? return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
>
> - ?type_decl = TYPE_STUB_DECL (type);
> + ?type_decl = TYPE_STUB_DECL(TYPE_MAIN_VARIANT(type));

Why?  That will go to the non-type-decl variant, so it seems wrong.

Richard.

>
> ? if (criterion == DINFO_STRUCT_FILE_SYS && DECL_IN_SYSTEM_HEADER (type_decl))
> ? ? return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]