This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/80746] New: [concepts] ICE evaluating constraints for concepts with dependent template parameters


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

            Bug ID: 80746
           Summary: [concepts] ICE evaluating constraints for concepts
                    with dependent template parameters
           Product: gcc
           Version: c++-concepts
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tom at honermann dot net
  Target Milestone: ---

gcc 6.2/7.0/trunk reports an ICE when checking constraints involving concepts
defined with dependent template parameters:

$ cat t.cpp
template<typename T, typename T::type>
concept bool C = true;
template<C<0> T> class ct {};
struct S {
  using type = int;
};
template class ct<S>;

$ g++ --version
g++ (GCC) 8.0.0 20170513 (experimental)
...

$ g++ -c -fconcepts t.cpp
t.cpp:3:13: internal compiler error: in tsubst, at cp/pt.c:13471
 template<C<0> T> class ct {};
             ^
0x5dc61a tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../source/gcc/cp/pt.c:13471
0x5daf5e tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../source/gcc/cp/pt.c:13895
0x5e6720 convert_template_argument
        ../../source/gcc/cp/pt.c:7623
0x5e7a10 coerce_template_parms
        ../../source/gcc/cp/pt.c:8098
0x6de12a resolve_variable_concept_check(tree_node*)
        ../../source/gcc/cp/constraint.cc:304
0x6de1d4 deduce_constrained_parameter(tree_node*, tree_node*&, tree_node*&)
        ../../source/gcc/cp/constraint.cc:329
0x61f41e cp_parser_maybe_constrained_type_specifier
        ../../source/gcc/cp/parser.c:17097
0x6333bd cp_parser_maybe_partial_concept_id
        ../../source/gcc/cp/parser.c:17154
0x6333bd cp_parser_template_id
        ../../source/gcc/cp/parser.c:15513
0x63362f cp_parser_class_name
        ../../source/gcc/cp/parser.c:21974
0x63dcc7 cp_parser_qualifying_entity
        ../../source/gcc/cp/parser.c:6287
0x63dcc7 cp_parser_nested_name_specifier_opt
        ../../source/gcc/cp/parser.c:5973
0x62a650 cp_parser_constructor_declarator_p
        ../../source/gcc/cp/parser.c:25986
0x62a650 cp_parser_decl_specifier_seq
        ../../source/gcc/cp/parser.c:13332
0x6448b5 cp_parser_parameter_declaration
        ../../source/gcc/cp/parser.c:21204
0x645856 cp_parser_template_parameter
        ../../source/gcc/cp/parser.c:15133
0x645856 cp_parser_template_parameter_list
        ../../source/gcc/cp/parser.c:14722
0x64670b cp_parser_explicit_template_declaration
        ../../source/gcc/cp/parser.c:26580
0x64670b cp_parser_template_declaration_after_export
        ../../source/gcc/cp/parser.c:26614
0x62b369 cp_parser_declaration
        ../../source/gcc/cp/parser.c:12462
...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]