Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-14 Thread Jason Merrill
Yes, thanks. On Wed, Dec 14, 2016 at 7:51 AM, Nathan Sidwell wrote: > On 12/13/2016 03:58 PM, Jason Merrill wrote: > >> I'm still seeing the redundant DECL_LANG_SPECIFIC check. > > > Sorry, I misunderstood which check you meant was redundant. In the original > patch, the first check wasn't redun

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-14 Thread Nathan Sidwell
On 12/13/2016 03:58 PM, Jason Merrill wrote: I'm still seeing the redundant DECL_LANG_SPECIFIC check. Sorry, I misunderstood which check you meant was redundant. In the original patch, the first check wasn't redundant (but the second check was entirely within the codepath of the first). Bu

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-13 Thread Jason Merrill
On 12/13/2016 03:43 PM, Nathan Sidwell wrote: On 12/13/2016 02:03 PM, Jason Merrill wrote: OK with those changes. Done. +/* Template information for an alias template type. */ +#define TYPE_ALIAS_TEMPLATE_INFO(NODE) \ + (DECL_LANG_SPECIFIC (TYPE_NAME (NODE

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-13 Thread Jason Merrill
On 12/13/2016 12:49 PM, Nathan Sidwell wrote: +/* Template information for an alias template type. */ +#define TYPE_ALIAS_TEMPLATE_INFO(NODE) \ + (DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \ + ? DECL_TEMPLATE_INFO (TYPE_NAME (NODE))

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-13 Thread Nathan Sidwell
On 12/12/2016 10:28 PM, Jason Merrill wrote: I suspect that most uses don't need to change. Indeed. This addresses the ones I could find. Both by grepping pt.c and fixing subsequent test fall out. took the opportunity to make the control flow in get_underlying_template somewhat clearer.

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-12 Thread Andrew Pinski
On Mon, Dec 12, 2016 at 11:12 AM, Nathan Sidwell wrote: > This patch fixes an ICE in a checking build where structural_comptypes > disagrees with TYPE_CANONICAL. > > An (implicit) template alias has a different TYPE_TI_TEMPLATE to the thing > its aliasing. That make structural comparison think it

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-12 Thread Jason Merrill
On Mon, Dec 12, 2016 at 5:48 PM, Nathan Sidwell wrote: > On 12/12/2016 04:44 PM, Jason Merrill wrote: >> >> On Mon, Dec 12, 2016 at 2:12 PM, Nathan Sidwell wrote: >>> >>> Solved by breaking TYPE_TEMPLATE_INFO into an underlying helper that >>> doesn't deal with type aliases. >> >> I like this ide

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-12 Thread Nathan Sidwell
On 12/12/2016 04:44 PM, Jason Merrill wrote: On Mon, Dec 12, 2016 at 2:12 PM, Nathan Sidwell wrote: Solved by breaking TYPE_TEMPLATE_INFO into an underlying helper that doesn't deal with type aliases. I like this idea, but I don't like the name. Since alias templates are generally transparen

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-12 Thread Jason Merrill
On Mon, Dec 12, 2016 at 2:12 PM, Nathan Sidwell wrote: > Solved by breaking TYPE_TEMPLATE_INFO into an underlying helper that doesn't > deal with type aliases. I like this idea, but I don't like the name. Since alias templates are generally transparent in the language, I wonder about changing TY