This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/51262] [4.7 Regression] ICE: SIGSEGV in primary_template_instantiation_p (pt.c:2874) with -flto -g
- From: "jason at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Dec 2011 03:25:17 +0000
- Subject: [Bug debug/51262] [4.7 Regression] ICE: SIGSEGV in primary_template_instantiation_p (pt.c:2874) with -flto -g
- Auto-submitted: auto-generated
- References: <bug-51262-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51262
--- Comment #4 from Jason Merrill <jason at redhat dot com> 2011-12-09 03:25:17 UTC ---
On 12/08/2011 11:46 AM, rguenth at gcc dot gnu.org wrote:
> Dodji, Jason, can such anonymous name types ever have TYPE_DECL_ALIAS_P
> set?
They can't, but
> - else if (CLASS_TYPE_P (t) && !TYPE_DECL_ALIAS_P (TYPE_NAME (t)))
> + else if (CLASS_TYPE_P (t)
> + && TYPE_NAME (t) && !TYPE_DECL_ALIAS_P (TYPE_NAME (t)))
> return CLASSTYPE_TEMPLATE_INSTANTIATION (t)
> && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t));
I would reverse the sense here so that the condition is satisfied by a
null TYPE_NAME, since an anonymous union is a non-alias class.
Jason