[Bug c++/79420] [7 Regression] ICE on invalid C++ code on x86_64-linux-gnu: in tsubst_copy, at cp/pt.c:14573
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 14 11:52:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79420
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We've got a dot expression 'f.x', where the postfix expression 'f' is an
OVERLOAD, and is incomplete. Since r245223:
/* In a template, be permissive by treating an object expression
of incomplete type as dependent (after a pedwarn). */
we give a pedwarn and treat 'f' as dependent. This then conflicts with this in
tsubst_copy:
case OVERLOAD:
/* An OVERLOAD will always be a non-dependent overload set; an
overload set from function scope will just be represented with an
IDENTIFIER_NODE, and from class scope with a BASELINK. */
gcc_assert (!uses_template_parms (t));
return t;
but T is an overload with a template parameter -> crash.
More information about the Gcc-bugs
mailing list