Fix PR debug/45088
Jason Merrill
jason@redhat.com
Wed Dec 15 03:52:00 GMT 2010
On 12/14/2010 01:26 PM, Dodji Seketeli wrote:
> + if (is_injected_class_name (TYPE_NAME (type)))
> + type = DECL_ORIGINAL_TYPE (TYPE_NAME (type));
Yes, that should do the trick, but I might still tweak it a bit.
The problematic case is when is_redundant_typedef (decl) &&
DECL_ORIGINAL_TYPE (decl) are both true; gen_decl_die assumes that these
two conditions can't occur together, which is why things break. This
change will make that assumption valid again, but I'd feel better about
using that condition directly (that is, if (is_redundant_typedef
(TYPE_NAME (type)) && DECL_ORIGINAL_TYPE (TYPE_NAME (type))) rather than
assuming that the injected-class-name is the only redundant typedef for
which this can happen.
I think we should also add an explicit assert to gen_decl_die in the
is_redundant_typedef case to make sure that DECL_ORIGINAL_TYPE is NULL_TREE.
Jason
More information about the Gcc-patches
mailing list