[Bug c++/85065] New: [concepts] ICE with invalid use of a concept
reichelt at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 24 17:00:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85065
Bug ID: 85065
Summary: [concepts] ICE with invalid use of a concept
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
Blocks: 67491
Target Milestone: ---
The following invalid code snippet (compiled with "-fconcepts")
triggers an ICE since GCC 6.2.0:
========================================
template<int> concept bool C = true;
C c = 0;
========================================
bug.cc:3:1: error: invalid reference to concept 'C<auto>'
C c = 0;
^
bug.cc:3:7: internal compiler error: in placeholder_extract_concept_and_args,
at cp/constraint.cc:1467
C c = 0;
^
0x5e9488 placeholder_extract_concept_and_args(tree_node*, tree_node*&,
tree_node*&)
../../gcc/gcc/cp/constraint.cc:1467
0x8651f1 hash_placeholder_constraint(tree_node*)
../../gcc/gcc/cp/constraint.cc:1522
0x95625f auto_hash::hash(tree_node*)
../../gcc/gcc/cp/pt.c:25615
0x95625f hash_table<auto_hash, xcallocator>::find_slot(tree_node* const&,
insert_option)
../../gcc/gcc/hash-table.h:414
0x95625f extract_autos_r
../../gcc/gcc/cp/pt.c:25649
0x956a41 for_each_template_parm_r
../../gcc/gcc/cp/pt.c:9579
0x11645eb walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hash_traits<tree_node*> >*))
../../gcc/gcc/tree.c:11387
0x9567b1 for_each_template_parm
../../gcc/gcc/cp/pt.c:9677
0x967982 extract_autos
../../gcc/gcc/cp/pt.c:25677
0x967982 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
../../gcc/gcc/cp/pt.c:26316
0x89ef73 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6911
0x93c2eb cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:19741
0x943758 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:13059
0x944568 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:12884
0x9484c2 cp_parser_declaration
../../gcc/gcc/cp/parser.c:12782
0x9488d1 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:12658
0x948bc4 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4563
0x948bc4 c_parse_file()
../../gcc/gcc/cp/parser.c:39024
0xa480d6 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1132
Please submit a full bug report, [etc.]
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues
More information about the Gcc-bugs
mailing list