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

            Bug ID: 64080
           Summary: [5.0 regression][C++14]ICE in
                    cxx_eval_store_expression
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lucdanton at free dot fr

Created attachment 34122
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34122&action=edit
Program exhibiting ICE

GCC version output:
g++-trunk (GCC) 5.0.0 20141126 (experimental)

The attached testcase is mechanically derived from a program
that used to compile. Compilation command together with output:
$ g++-trunk -std=c++14 ice.cpp 
ice.cpp: In instantiation of 'int invoke(Functor, Args&& ...) [with Functor =
plus_assign; Args = {int, int}]':
ice.cpp:18:37:   required by substitution of 'template<class Functor, class
Tuple, int ...Indices, class> typename result<typename tuple_element<Indices,
Tuple>::type ...>::type uncurry(Functor, Tuple, integer_sequence<int, Indices
...>) [with Functor = plus_assign; Tuple = tuple<int>; int ...Indices = {0, 0};
<template-parameter-1-4> = <missing>]'
ice.cpp:27:41:   required by substitution of 'template<int ...ElementIndices,
class Functor, class ... Tuples, class> void zip_with(Functor, Tuples ...)
[with int ...ElementIndices = 0; Functor = plus_assign; Tuples = {tuple<int>};
<template-parameter-1-4> = <missing>]'
ice.cpp:38:47:   required from here
ice.cpp:15:54:   in constexpr expansion of
'functor.plus_assign::operator()<int&, int&>((* & args#0), (* & args#1))'
ice.cpp:14:5: internal compiler error: in cxx_eval_store_expression, at
cp/constexpr.c:2492
 int invoke(Functor functor,
     ^
0x6d9fdd cxx_eval_store_expression
    ../../gcc/gcc/cp/constexpr.c:2492
0x6d7916 cxx_eval_constant_expression
    ../../gcc/gcc/cp/constexpr.c:2961
0x6d7653 cxx_eval_constant_expression
    ../../gcc/gcc/cp/constexpr.c:3192
0x6d795c cxx_eval_constant_expression
    ../../gcc/gcc/cp/constexpr.c:3066
0x6d795c cxx_eval_constant_expression
    ../../gcc/gcc/cp/constexpr.c:3066
0x6d7173 cxx_eval_call_expression
    ../../gcc/gcc/cp/constexpr.c:1335
0x6d8018 cxx_eval_constant_expression
    ../../gcc/gcc/cp/constexpr.c:2877
0x6d9857 is_sub_constant_expr(tree_node*)
    ../../gcc/gcc/cp/constexpr.c:3436
0x67e92d check_noexcept_r
    ../../gcc/gcc/cp/except.c:1168
0xc5b6e4 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hashset_traits>*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hashset_traits>*))
    ../../gcc/gcc/tree.c:11022
0xc5ce08 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*,
default_hashset_traits>*))
    ../../gcc/gcc/tree.c:11335
0x67e64f expr_noexcept_p(tree_node*, int)
    ../../gcc/gcc/cp/except.c:1245
0x67e7b2 finish_noexcept_expr(tree_node*, int)
    ../../gcc/gcc/cp/except.c:1230
0x5f7f48 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
    ../../gcc/gcc/cp/pt.c:14832
0x61154d maybe_instantiate_noexcept(tree_node*)
    ../../gcc/gcc/cp/pt.c:19899
0x62c01f mark_used(tree_node*, int)
    ../../gcc/gcc/cp/decl2.c:4879
0x5c6079 build_over_call
    ../../gcc/gcc/cp/call.c:7434
0x5cee51 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
    ../../gcc/gcc/cp/call.c:4081
0x693cf9 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
    ../../gcc/gcc/cp/semantics.c:2392
0x5f9595 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
    ../../gcc/gcc/cp/pt.c:15148
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