[Bug c++/84663] [6/7/8 Regression] internal compiler error: tree check: expected array_type, have error_mark in cp_complete_array_type, at cp/decl.c:8334
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 2 11:13:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84663
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> ---
I think this should be enough:
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8323,7 +8323,7 @@ cp_complete_array_type (tree *ptype, tree initial_value,
bool do_default)
bits. See also complete_type which does the same thing for arrays
of fixed size. */
type = *ptype;
- if (TYPE_DOMAIN (type))
+ if (type != error_mark_node && TYPE_DOMAIN (type))
{
elt_type = TREE_TYPE (type);
TYPE_NEEDS_CONSTRUCTING (type) = TYPE_NEEDS_CONSTRUCTING (elt_type);
More information about the Gcc-bugs
mailing list