From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16173 invoked by alias); 18 Oct 2014 11:41:59 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16142 invoked by uid 48); 18 Oct 2014 11:41:54 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/63584] [4.8/4.9 Regression] ICE in strip_typedefs, at cp/tree.c:1326 Date: Sat, 18 Oct 2014 11:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc cf_known_to_work target_milestone short_desc everconfirmed cf_known_to_fail Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg01437.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63584 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-10-18 CC| |trippels at gcc dot gnu.org Known to work| |5.0 Target Milestone|--- |4.8.5 Summary|ICE in strip_typedefs, at |[4.8/4.9 Regression] ICE in |cp/tree.c:1326 |strip_typedefs, at | |cp/tree.c:1326 Ever confirmed|0 |1 Known to fail| |4.8.3, 4.9.1 --- Comment #2 from Markus Trippelsdorf --- ~ % cat preprocessed_repro.ii namespace std { template struct A { static constexpr _Tp value = __v; }; typedef A false_type; template void declval (); struct __add_lvalue_reference_helper { typedef int type; }; int make_tuple (); template struct __lazy_conditional; template struct __lazy_conditional { using type = typename F::type; }; template struct B { using execution_category = typename Executor::execution_category; using shape_type = struct tuple_of_references_t; template struct C : __lazy_conditional { }; template using shared_param_type = typename C::type; }; template auto __make_tuple_if_not_nested (T) -> decltype (make_tuple ()); template class D { using outer_executor_type = Executor1; using inner_executor_type = Executor2; using outer_traits = B; using inner_traits = B; using inner_execution_category = typename inner_traits::execution_category; using outer_index_type = typename outer_traits::shape_type; using inner_shape_type = typename inner_traits::shape_type; public: using shape_type = decltype (__make_tuple_if_not_nested ( declval)); template struct inner_lambda_gcc49_workaround { }; template void bulk_async (Function, shape_type, Tuple shared_arg_tuple) { auto outer_shared_arg (shared_arg_tuple); using outer_shared_ref_type = typename outer_traits::template shared_param_type; [] { inner_lambda_gcc49_workaround{}; }; } }; class F { public: using execution_category = int; }; } main () { std::D ex2; ex2.bulk_async ([] { }, std::make_tuple (), std::make_tuple); } ~ % g++ -c -O0 -std=c++11 preprocessed_repro.ii preprocessed_repro.ii: In instantiation of 'std::D::bulk_async(Function, std::D::shape_type, Tuple):: [with Function = main()::; Tuple = int (*)(); Executor1 = std::F; Executor2 = std::F]': preprocessed_repro.ii:57:6: required from 'struct std::D::bulk_async(Function, std::D::shape_type, Tuple) [with Function = main()::; Tuple = int (*)(); Executor1 = std::F; Executor2 = std::F; std::D::shape_type = int; std::D::inner_execution_category = int; std::D::inner_shape_type = std::tuple_of_references_t]::' preprocessed_repro.ii:57:5: required from 'void std::D::bulk_async(Function, std::D::shape_type, Tuple) [with Function = main()::; Tuple = int (*)(); Executor1 = std::F; Executor2 = std::F; std::D::shape_type = int; std::D::inner_execution_category = int; std::D::inner_shape_type = std::tuple_of_references_t]' preprocessed_repro.ii:75:54: required from here preprocessed_repro.ii:59:7: internal compiler error: in strip_typedefs, at cp/tree.c:1326 inner_lambda_gcc49_workaround{}; ^ 0x6118b7 strip_typedefs(tree_node*) ../../gcc-4.9.1-src/gcc/cp/tree.c:1326 0x558e4c canonicalize_type_argument ../../gcc-4.9.1-src/gcc/cp/pt.c:6349 0x5672e0 coerce_template_parms ../../gcc-4.9.1-src/gcc/cp/pt.c:7002 0x56ba4a lookup_template_class_1 ../../gcc-4.9.1-src/gcc/cp/pt.c:7551 0x56ba4a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc-4.9.1-src/gcc/cp/pt.c:7886 0x56dbe7 tsubst_aggr_type ../../gcc-4.9.1-src/gcc/cp/pt.c:10196 0x568493 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc-4.9.1-src/gcc/cp/pt.c:11604 0x5612f6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-4.9.1-src/gcc/cp/pt.c:15075 0x5656ff tsubst_expr ../../gcc-4.9.1-src/gcc/cp/pt.c:14016 0x5647af tsubst_expr ../../gcc-4.9.1-src/gcc/cp/pt.c:13432 0x5656cd tsubst_expr ../../gcc-4.9.1-src/gcc/cp/pt.c:13623 0x5656cd tsubst_expr ../../gcc-4.9.1-src/gcc/cp/pt.c:13623 0x564402 instantiate_decl(tree_node*, int, bool) ../../gcc-4.9.1-src/gcc/cp/pt.c:19922 0x579d11 instantiate_class_template_1 ../../gcc-4.9.1-src/gcc/cp/pt.c:9367 0x579d11 instantiate_class_template(tree_node*) ../../gcc-4.9.1-src/gcc/cp/pt.c:9435 0x5cfffd complete_type(tree_node*) ../../gcc-4.9.1-src/gcc/cp/typeck.c:134 0x560db6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-4.9.1-src/gcc/cp/pt.c:15284 0x5656ff tsubst_expr ../../gcc-4.9.1-src/gcc/cp/pt.c:14016 0x5647af tsubst_expr ../../gcc-4.9.1-src/gcc/cp/pt.c:13432 0x564fd4 tsubst_expr ../../gcc-4.9.1-src/gcc/cp/pt.c:13418 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.