[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 12:35:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79420
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
One way would be to never change OVERLOADs back to being dependent, as in
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7331,7 +7331,8 @@ cp_parser_postfix_dot_deref_expression (cp_parser
*parser,
(scope, current_class_type))))
{
scope = complete_type (scope);
- if (!COMPLETE_TYPE_P (scope))
+ if (!COMPLETE_TYPE_P (scope)
+ && TREE_CODE (postfix_expression) != OVERLOAD)
{
/* In a template, be permissive by treating an object expression
of incomplete type as dependent (after a pedwarn). */
but I really need Jason.
More information about the Gcc-bugs
mailing list