https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71126
Bug ID: 71126 Summary: [concepts] ICE on ill-formed code declaring a variable with a non-type concept Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tom at honermann dot net CC: andrew.n.sutton at gmail dot com, asutton at gcc dot gnu.org Target Milestone: --- The following ill-formed code triggers an ICE in gcc r236239. $ cat t.cpp template<int N> concept bool C = N==1; C c = 1; $ svn info Path: . Working Copy Root Path: /home/tom/src/gcc-trunk URL: svn://gcc.gnu.org/svn/gcc/trunk Relative URL: ^/trunk Repository Root: svn://gcc.gnu.org/svn/gcc Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4 Revision: 236239 Node Kind: directory Schedule: normal Last Changed Author: uros Last Changed Rev: 236238 Last Changed Date: 2016-05-14 05:07:13 -0400 (Sat, 14 May 2016) $ g++ --version g++ (GCC) 7.0.0 20160514 (experimental) ... $ g++ -c -std=c++1z -fconcepts t.cpp t.cpp:3:7: internal compiler error: tree check: expected tree_vec, have error_mark in tsubst, at cp/pt.c:12954 C c = 1; ^ 0xff7e0c tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc-trunk/gcc/tree.c:9753 0x6bd076 tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc-trunk/gcc/tree.h:3025 0x6bd076 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc-trunk/gcc/cp/pt.c:12954 0x6b1a78 tsubst_copy ../../gcc-trunk/gcc/cp/pt.c:14077 0x6b787a tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-trunk/gcc/cp/pt.c:17161 0x6b720b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-trunk/gcc/cp/pt.c:16176 0x6abfee tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-trunk/gcc/cp/pt.c:15800 0x889617 satisfy_predicate_constraint ../../gcc-trunk/gcc/cp/constraint.cc:1768 0x889617 satisfy_constraint_1 ../../gcc-trunk/gcc/cp/constraint.cc:1975 0x88a416 satisfy_constraint ../../gcc-trunk/gcc/cp/constraint.cc:2026 0x6deb08 lookup_and_finish_template_variable ../../gcc-trunk/gcc/cp/pt.c:8715 0x6b87c2 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-trunk/gcc/cp/pt.c:15991 0x6abfee tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-trunk/gcc/cp/pt.c:15800 0x889617 satisfy_predicate_constraint ../../gcc-trunk/gcc/cp/constraint.cc:1768 0x889617 satisfy_constraint_1 ../../gcc-trunk/gcc/cp/constraint.cc:1975 0x88a416 satisfy_constraint ../../gcc-trunk/gcc/cp/constraint.cc:2026 0x88b694 constraints_satisfied_p(tree_node*, tree_node*) ../../gcc-trunk/gcc/cp/constraint.cc:2146 0x6eaf3a do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context) ../../gcc-trunk/gcc/cp/pt.c:24065 0x67a9bb cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc-trunk/gcc/cp/decl.c:6606 0x77e62f cp_parser_init_declarator ../../gcc-trunk/gcc/cp/parser.c:18694 ...