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

            Bug ID: 93596
           Summary: ICE related to templates and vectors.
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pacoarjonilla at yahoo dot es
  Target Milestone: ---

Minimum trigger code:
=====================================================

#include <vector>

template <typename T> class A { };
template <typename T> struct B {
  A<T> x;
  void f() {
      A a = std::vector<int>{x};
  }
};

=====================================================


On GCC10 master branch 2020.02.05 commit
9847df2c9573f1e4b948b5a7272c6aadf8e01c22
OpenSUSE Tumbleweed intel i7



paco~gitnamiplotsrcg++10git --std=c++2a namiplot.cc 
namiplot.cc: In member function ‘void B<T>::f()’:
namiplot.cc:7:31: internal compiler error: in reshape_init, at cp/decl.c:6481
    7 |       A a = std::vector<int>{x};
      |                               ^
0x6257f2 reshape_init(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/decl.c:6481
0x9f2c02 maybe_aggr_guide
        ../../gcc/gcc/cp/pt.c:28237
0x9f2c02 do_class_deduction
        ../../gcc/gcc/cp/pt.c:28653
0x9f2c02 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ../../gcc/gcc/cp/pt.c:28758
0x9261ec cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/gcc/cp/decl.c:7483
0x9ccf04 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:20831
0x9aec00 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:13678
0x9b097a cp_parser_declaration_statement
        ../../gcc/gcc/cp/parser.c:13110
0x9b1586 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:11423
0x9b24a8 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:11789
0x9b2588 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:11739
0x9c91a5 cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:22984
0x9c91a5 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:23035
0x9cc4fd cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:28885
0x9cd8bc cp_parser_late_parsing_for_member
        ../../gcc/gcc/cp/parser.c:29791
0x9ac073 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:24077
0x9ad032 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:24101
0x9ad032 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:17658
0x9ae0bf cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:14303
0x9d3c65 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:29285
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to