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

            Bug ID: 68394
           Summary: [concepts] segfault in valid code
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

Created attachment 36744
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36744&action=edit
preprocessed code

The attached code compiles with an earlier version of gcc-6 but now it
segfaults with the following stack trace:

bug5.cpp: In instantiation of ‘constexpr const bool
htl::detail_concept::mappable_elements’:
bug5.cpp:102:26:   required from ‘constexpr const bool
htl::detail_concept::mappable_impl’
bug5.cpp:159:30:   required from here
bug5.cpp:88:19: internal compiler error: Segmentation fault
       std::forward(get(std::forward<TupleForwards>)...);
                   ^

0xcfb02f crash_signal
        ../../gcc/gcc/toplev.c:334
0x5fadf5 resolve_args
        ../../gcc/gcc/cp/call.c:3956
0x612759 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        ../../gcc/gcc/cp/call.c:4066
0x7a4cde finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2403
0x677cb4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:16420
0x66c7fc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15592
0x843ebb satisfy_expression_constraint
        ../../gcc/gcc/cp/constraint.cc:1827
0x843ebb satisfy_constraint_1
        ../../gcc/gcc/cp/constraint.cc:2001
0x8449f6 satisfy_constraint
        ../../gcc/gcc/cp/constraint.cc:2049
0x612944 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        ../../gcc/gcc/cp/call.c:4135
0x7a4cde finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2403
0x677cb4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:16420
0x66c7fc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15592
0x688bd2 gen_elem_of_pack_expansion_instantiation
        ../../gcc/gcc/cp/pt.c:10493
0x688bd2 tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:10911
0x69174a tsubst_template_args
        ../../gcc/gcc/cp/pt.c:11014
0x67633e tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:15778
0x66c7fc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15592
0x6a9c74 regenerate_decl_from_template
        ../../gcc/gcc/cp/pt.c:21216
0x6a9c74 instantiate_decl(tree_node*, int, bool)
        ../../gcc/gcc/cp/pt.c:21635
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to