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

            Bug ID: 67686
           Summary: [concepts] segfault in finish_call_expr function
           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 36372
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36372&action=edit
preprocessed code

The attached code causes a segfault with gcc 6.0 when compiling with
-std=c++1z. Here's the stack trace:


In file included from
/home/rnburn/proj/echo/htl/include/echo/htl/algorithm.h:10:0,
                 from /home/rnburn/proj/echo/htl/unittest/algorithm.cpp:1:
/home/rnburn/proj/echo/htl/include/echo/htl/concept.h: In instantiation of
‘constexpr const bool echo::htl::detail_concept::mappable_elements’:
/home/rnburn/proj/echo/htl/include/echo/htl/concept.h:70:22:   required from
‘constexpr const bool echo::htl::detail_concept::mappable_impl’
/home/rnburn/proj/echo/htl/unittest/algorithm.cpp:60:23:   required from here
/home/rnburn/proj/echo/htl/include/echo/htl/concept.h:40:66: internal compiler
error: Segmentation fault
     requires cpt_CopyConstructible<decltype(std::forward<Functor>(functor)(
                                                                  ^
0xcacfef crash_signal
        ../../gcc/gcc/toplev.c:352
0x5edf35 resolve_args
        ../../gcc/gcc/cp/call.c:3951
0x60627d build_op_call_1
        ../../gcc/gcc/cp/call.c:4287
0x60627d build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
        ../../gcc/gcc/cp/call.c:4390
0x7901ba finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2408
0x68131f tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:15872
0x661a6c tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:13138
0x67cd12 tsubst_template_args
        ../../gcc/gcc/cp/pt.c:10839
0x660054 tsubst_aggr_type
        ../../gcc/gcc/cp/pt.c:11036
0x6621dc tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:12505
0x67e7ea tsubst_qualified_id
        ../../gcc/gcc/cp/pt.c:13335
0x68081b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:15452
0x66aad1 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15044
0x823207 satisfy_predicate_constraint
        ../../gcc/gcc/cp/constraint.cc:1694
0x823207 satisfy_constraint_1
        ../../gcc/gcc/cp/constraint.cc:1898
0x8235cd satisfy_parameterized_constraint
        ../../gcc/gcc/cp/constraint.cc:1841
0x8235cd satisfy_constraint_1
        ../../gcc/gcc/cp/constraint.cc:1916
0x823f76 satisfy_constraint
        ../../gcc/gcc/cp/constraint.cc:1949
0x605b94 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        ../../gcc/gcc/cp/call.c:4130
0x78ff5e finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2391
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