https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65390
Bug ID: 65390 Summary: ICE in strip_typedefs, at cp/tree.c:1361 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: alserkli at inbox dot ru Created attachment 35013 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35013&action=edit preprocessed source g++ (GCC) 5.0.0 20150311 (experimental) === e.cc === #include <memory> auto f(int n){ return std::make_shared<int[n]>(); } === $ g++ -std=c++14 e.cc In file included from /opt/include/c++/5.0.0/memory:82:0, from e.cc:1: /opt/include/c++/5.0.0/bits/shared_ptr.h: In substitution of 'template<class _Tp, class ... _Args> std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = int [n]; _Args = {}]': e.cc:3:35: required from here /opt/include/c++/5.0.0/bits/shared_ptr.h:626:5: internal compiler error: in strip_typedefs, at cp/tree.c:1361 make_shared(_Args&&... __args) ^ 0x7bbc4d strip_typedefs(tree_node*) /gcc/gcc/cp/tree.c:1361 0x6534d2 canonicalize_type_argument /gcc/gcc/cp/pt.c:6500 0x67f7fa coerce_template_parms /gcc/gcc/cp/pt.c:7171 0x681789 lookup_template_class_1 /gcc/gcc/cp/pt.c:7780 0x681789 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /gcc/gcc/cp/pt.c:8096 0x684cd8 tsubst_aggr_type /gcc/gcc/cp/pt.c:10460 0x67704b tsubst(tree_node*, tree_node*, int, tree_node*) /gcc/gcc/cp/pt.c:11909 0x68bc6f tsubst_function_type /gcc/gcc/cp/pt.c:11624 0x677186 tsubst(tree_node*, tree_node*, int, tree_node*) /gcc/gcc/cp/pt.c:12357 0x6a219d fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) /gcc/gcc/cp/pt.c:16259 0x615479 add_template_candidate_real /gcc/gcc/cp/call.c:3057 0x615f0c add_template_candidate /gcc/gcc/cp/call.c:3154 0x615f0c add_candidates /gcc/gcc/cp/call.c:5285 0x6163d3 perform_overload_resolution /gcc/gcc/cp/call.c:4003 0x6188ca build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) /gcc/gcc/cp/call.c:4080 0x7907d1 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) /gcc/gcc/cp/semantics.c:2407 0x7147e1 cp_parser_postfix_expression /gcc/gcc/cp/parser.c:6368 0x71c349 cp_parser_unary_expression /gcc/gcc/cp/parser.c:7438 0x71d047 cp_parser_binary_expression /gcc/gcc/cp/parser.c:8172 0x71d87f cp_parser_assignment_expression /gcc/gcc/cp/parser.c:8430