[Bug c++/84972] [6/7/8 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in extended_tree, at tree.h:5545

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 20 20:28:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84972

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot com

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This bit of my in progress patch handles this case:

Index: decl.c
===================================================================
--- decl.c      (revision 258674)
+++ decl.c      (working copy)
@@ -5467,7 +5467,9 @@ maybe_deduce_size_from_array_init (tree decl, tree
              failure = 1;
        }

-      if (!failure)
+      if (failure)
+       TREE_TYPE (decl) = error_mark_node;
+      else
        {
          failure = cp_complete_array_type (&TREE_TYPE (decl), initializer,
                                            do_default);


More information about the Gcc-bugs mailing list