[Bug c++/78690] [7 Regression] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:552

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 6 16:46:00 GMT 2016


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This ICE happens because we arrive in cxx_incomplete_type_diagnostic with type
== global type, which is a LANG_TYPE:
 545     case LANG_TYPE:
 546       if (type == init_list_type_node)
 547         {
 548           emit_diagnostic (diag_kind, loc, 0,
 549                            "invalid use of brace-enclosed initializer
list");
 550           break;
 551         }
 552       gcc_assert (type == unknown_type_node);

and we crash on the assert.  Now, we've gotten there because since r236221 "a"
in this testcase

struct a;
template <typename b> class c {
  using b::a;
  void d() { a. }
};

isn't considered a dependent object anymore, so we go to complete_type_or_else
in cp_parser_postfix_dot_deref_expression.  Not sure if it should be.


More information about the Gcc-bugs mailing list