This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/68348] [6 regression] ICE: segfault in cxx_eval_constant_expression at cp/constexpr.c:3172


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

--- Comment #6 from UroÅ Bizjak <ubizjak at gmail dot com> ---
gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
cxx_eval_constant_expression (ctx=0x7fffffffd2a0, t=0x2aaaae7bf258, lval=false,
non_constant_p=0x7fffffffd78f, overflow_p=0x7fffffffd78e, 
    jump_target=0x0) at ../../gcc-svn/trunk/gcc/cp/constexpr.c:3180
3180          return (*ctx->values->get (t));
(gdb) list
3175          if (lval)
3176            return t;
3177          /* We ask for an rvalue for the RESULT_DECL when indirecting
3178             through an invisible reference, or in named return value
3179             optimization.  */
3180          return (*ctx->values->get (t));
3181
3182        case VAR_DECL:
3183        case CONST_DECL:
3184          /* We used to not check lval for CONST_DECL, but darwin.c uses
(gdb) bt
#0  cxx_eval_constant_expression (ctx=0x7fffffffd2a0, t=0x2aaaae7bf258,
lval=false, non_constant_p=0x7fffffffd78f, overflow_p=0x7fffffffd78e, 
    jump_target=0x0) at ../../gcc-svn/trunk/gcc/cp/constexpr.c:3180
#1  0x00000000007a4935 in cxx_eval_indirect_ref (ctx=0x7fffffffd2a0,
t=0x2aaaae8d3780, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e) at ../../gcc-svn/trunk/gcc/cp/constexpr.c:2617
#2  0x000000000079dba8 in cxx_eval_constant_expression (ctx=0x7fffffffd2a0,
t=0x2aaaae8d3780, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e, jump_target=0x0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3372
#3  0x00000000007a64f5 in cxx_eval_component_reference (ctx=0x7fffffffd2a0,
t=0x2aaaae7a8ab0, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e) at ../../gcc-svn/trunk/gcc/cp/constexpr.c:1882
#4  0x000000000079e500 in cxx_eval_constant_expression (ctx=0x7fffffffd2a0,
t=0x2aaaae7a8ab0, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e, jump_target=0x0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3522
#5  0x000000000079d603 in cxx_eval_constant_expression (ctx=0x7fffffffd2a0,
t=0x2aaaae8d3760, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e, jump_target=0x0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3572
#6  0x00000000007a42ad in cxx_eval_store_expression (ctx=0x7fffffffd760,
t=0x2aaaae8d2460, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e) at ../../gcc-svn/trunk/gcc/cp/constexpr.c:2844
#7  0x000000000079dcae in cxx_eval_constant_expression (ctx=0x7fffffffd760,
t=0x2aaaae8d2460, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e, jump_target=0x0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3313
#8  0x000000000079d790 in cxx_eval_constant_expression (ctx=0x7fffffffd760,
t=0x2aaaae8d3740, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e, jump_target=0x7fffffffd5f0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3326
#9  0x000000000079d58b in cxx_eval_constant_expression (ctx=0x7fffffffd760,
t=0x2aaaae8d2438, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e, jump_target=0x7fffffffd5f0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3433
#10 0x000000000079caa7 in cxx_eval_call_expression (ctx=0x7fffffffd760,
t=0x2aaaae8d40e0, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e) at ../../gcc-svn/trunk/gcc/cp/constexpr.c:1396
#11 0x000000000079d6e8 in cxx_eval_constant_expression (ctx=0x7fffffffd760,
t=0x2aaaae8d40e0, lval=false, non_constant_p=0x7fffffffd78f, 
    overflow_p=0x7fffffffd78e, jump_target=0x0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3239
#12 0x000000000079f7ee in cxx_eval_outermost_constant_expr (t=0x2aaaae8d40e0,
allow_non_constant=true, strict=<optimized out>, object=0x0)
    at ../../gcc-svn/trunk/gcc/cp/constexpr.c:3774
#13 0x00000000007a262d in maybe_constant_value_1 (t=0x2aaaae8d40e0, decl=0x0)
at ../../gcc-svn/trunk/gcc/cp/constexpr.c:3960
#14 0x00000000007a27d8 in maybe_constant_value (t=0x2aaaae8d40e0, decl=0x0) at
../../gcc-svn/trunk/gcc/cp/constexpr.c:3981
#15 0x0000000000779fca in cp_fold (x=0x2aaaae8d40e0) at
../../gcc-svn/trunk/gcc/cp/cp-gimplify.c:2156
#16 0x00000000007813f5 in cp_fold_r (stmt_p=0x2aaaae8d35f8, walk_subtrees=0x3,
data=0x0) at ../../gcc-svn/trunk/gcc/cp/cp-gimplify.c:939
#17 0x0000000000ff1548 in walk_tree_1 (tp=0x2aaaae8d35f8, func=0x7813c0
<cp_fold_r(tree*, int*, void*)>, data=0x0, pset=0x0, lh=
    0x730910 <cp_walk_subtrees(tree_node**, int*, tree_node* (*)(tree_node**,
int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*)>)
at ../../gcc-svn/trunk/gcc/tree.c:11493
#18 0x0000000000ff1887 in walk_tree_1 (tp=0x2aaaae7a8aa0, func=0x7813c0
<cp_fold_r(tree*, int*, void*)>, data=0x0, pset=0x0, 
    lh=0x730910 <cp_walk_subtrees(tree_node**, int*, tree_node*
(*)(tree_node**, int*, void*), void*, hash_set<tree_node*,
default_hash_traits<tree_node*> >*)>) at ../../gcc-svn/trunk/gcc/tree.c:11598
#19 0x0000000000780d85 in cp_genericize (fndecl=0x2aaaae8d0460) at
../../gcc-svn/trunk/gcc/cp/cp-gimplify.c:1478

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]