This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78690] [7 Regression] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:552
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2016 16:45:49 +0000
- Subject: [Bug c++/78690] [7 Regression] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:552
- Auto-submitted: auto-generated
- References: <bug-78690-4@http.gcc.gnu.org/bugzilla/>
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.