[Bug middle-end/66434] cc1plus: internal compiler error: in gimplify_modify_expr, at gimplify.c:4616
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 8 11:39:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66434
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, so it boils down to fold-const.c moving computations into cond ? expr : cst
and thus exposing the possible trapping expressions inside the conditional
(which comes from number of iteration analysis maybe-zero condition).
There isn't a convenient way to disable this (and no reason to do that for
GENERIC).
#0 fold_build2_stat_loc (loc=0, code=PLUS_EXPR,
type=<integer_type 0x7ffff68d07e0 long int>,
op0=<cond_expr 0x7ffff6a6b8d0>, op1=<integer_cst 0x7ffff6a69000>)
at /space/rguenther/tramp3d/trunk/gcc/fold-const.c:14279
#1 0x0000000000c52d78 in fold_plusminus_mult_expr (loc=0, code=PLUS_EXPR,
type=<integer_type 0x7ffff68d07e0 long int>,
arg0=<mult_expr 0x7ffff6a6f690>, arg1=<ssa_name 0x7ffff6a60870>)
at /space/rguenther/tramp3d/trunk/gcc/fold-const.c:7274
#2 0x0000000000c5f5cc in fold_binary_loc (loc=0, code=PLUS_EXPR,
type=<integer_type 0x7ffff68d07e0 long int>,
op0=<mult_expr 0x7ffff6a6f690>, op1=<ssa_name 0x7ffff6a60870>)
at /space/rguenther/tramp3d/trunk/gcc/fold-const.c:10086
#3 0x0000000000c75289 in fold_build2_stat_loc (loc=0, code=PLUS_EXPR,
type=<integer_type 0x7ffff68d07e0 long int>,
op0=<mult_expr 0x7ffff6a6f690>, op1=<ssa_name 0x7ffff6a60870>)
at /space/rguenther/tramp3d/trunk/gcc/fold-const.c:14279
#4 0x0000000000c5e758 in fold_binary_loc (loc=0, code=PLUS_EXPR,
type=<integer_type 0x7ffff68d07e0 long int>,
op0=<ssa_name 0x7ffff6a60870>, op1=<mult_expr 0x7ffff6a6f690>)
at /space/rguenther/tramp3d/trunk/gcc/fold-const.c:9912
#5 0x0000000000c75289 in fold_build2_stat_loc (loc=0, code=PLUS_EXPR,
type=<integer_type 0x7ffff68d07e0 long int>,
op0=<ssa_name 0x7ffff6a60870>, op1=<mult_expr 0x7ffff6a6f690>)
at /space/rguenther/tramp3d/trunk/gcc/fold-const.c:14279
#6 0x000000000188ed24 in chrec_fold_plus_1 (code=PLUS_EXPR,
type=<integer_type 0x7ffff68d07e0 long int>,
op0=<ssa_name 0x7ffff6a60870>, op1=<mult_expr 0x7ffff6a6f690>)
at /space/rguenther/tramp3d/trunk/gcc/tree-chrec.c:360
#7 0x000000000188ee34 in chrec_fold_plus (
type=<integer_type 0x7ffff68d07e0 long int>,
op0=<ssa_name 0x7ffff6a60870>, op1=<mult_expr 0x7ffff6a6f690>)
at /space/rguenther/tramp3d/trunk/gcc/tree-chrec.c:393
#8 0x000000000115477e in add_to_evolution_1 (loop_nb=4,
chrec_before=<polynomial_chrec 0x7ffff6a6b7b0>,
to_add=<mult_expr 0x7ffff6a6f690>, at_stmt=<gimple_phi 0x7ffff6a5cb00>)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:672
#9 0x0000000001154b2e in add_to_evolution (loop_nb=4,
chrec_before=<polynomial_chrec 0x7ffff6a6b7b0>, code=PLUS_EXPR,
to_add=<mult_expr 0x7ffff6a6f690>, at_stmt=<gimple_phi 0x7ffff6a5cb00>)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:865
#10 0x0000000001154f70 in follow_ssa_edge_binary (loop=0x7ffff6a4d620,
at_stmt=<gimple_phi 0x7ffff6a5cb00>,
type=<integer_type 0x7ffff68d07e0 long int>,
rhs0=<mult_expr 0x7ffff6a6f690>, code=PLUS_EXPR,
rhs1=<ssa_name 0x7ffff6a60630>, halting_phi=0x7ffff6a5c300,
evolution_of_loop=0x7fffffffd460, limit=2)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1008
#11 0x000000000115531e in follow_ssa_edge_expr (loop=0x7ffff6a4d620,
at_stmt=<gimple_phi 0x7ffff6a5cb00>, expr=<plus_expr 0x7ffff6a6f6b8>,
halting_phi=0x7ffff6a5c300, evolution_of_loop=0x7fffffffd460, limit=2)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1113
#12 0x0000000001155a63 in follow_ssa_edge_inner_loop_phi (
outer_loop=0x7ffff6a4d620, loop_phi_node=0x7ffff6a5cb00,
halting_phi=0x7ffff6a5c300, evolution_of_loop=0x7fffffffd460, limit=2)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1340
#13 0x0000000001155b91 in follow_ssa_edge (loop=0x7ffff6a4d620,
def=<gimple_phi 0x7ffff6a5cb00>, halting_phi=0x7ffff6a5c300,
evolution_of_loop=0x7fffffffd460, limit=1)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1389
#14 0x0000000001154d8b in follow_ssa_edge_binary (loop=0x7ffff6a4d620,
at_stmt=<gimple_assign 0x7ffff6a5e108>,
type=<integer_type 0x7ffff68d07e0 long int>,
rhs0=<ssa_name 0x7ffff6a60510>, code=PLUS_EXPR,
rhs1=<ssa_name 0x7ffff6a60870>, halting_phi=0x7ffff6a5c300,
evolution_of_loop=0x7fffffffd5d0, limit=1)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:961
#15 0x000000000115565b in follow_ssa_edge_in_rhs (loop=0x7ffff6a4d620,
stmt=<gimple_assign 0x7ffff6a5e108>, halting_phi=0x7ffff6a5c300,
evolution_of_loop=0x7fffffffd5d0, limit=0)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1181
#16 0x0000000001155bb8 in follow_ssa_edge (loop=0x7ffff6a4d620,
def=<gimple_assign 0x7ffff6a5e108>, halting_phi=0x7ffff6a5c300,
evolution_of_loop=0x7fffffffd5d0, limit=0)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1396
#17 0x00000000011557b4 in follow_ssa_edge_in_condition_phi_branch (i=0,
loop=0x7ffff6a4d620, condition_phi=0x7ffff6a5c900,
halting_phi=0x7ffff6a5c300, evolution_of_branch=0x7fffffffd5d0,
init_cond=<ssa_name 0x7ffff6a60120>, limit=0)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1236
#18 0x0000000001155811 in follow_ssa_edge_in_condition_phi (
loop=0x7ffff6a4d620, condition_phi=0x7ffff6a5c900,
halting_phi=0x7ffff6a5c300, evolution_of_loop=0x7fffffffd680, limit=0)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1264
#19 0x0000000001155b24 in follow_ssa_edge (loop=0x7ffff6a4d620,
def=<gimple_phi 0x7ffff6a5c900>, halting_phi=0x7ffff6a5c300,
evolution_of_loop=0x7fffffffd680, limit=0)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1371
#20 0x000000000115603f in analyze_evolution_in_loop (
loop_phi_node=0x7ffff6a5c300, init_cond=<ssa_name 0x7ffff6a60120>)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1507
#21 0x00000000011564f9 in interpret_loop_phi (loop=0x7ffff6a4d620,
loop_phi_node=0x7ffff6a5c300)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:1660
#22 0x000000000115784c in analyze_scalar_evolution_1 (loop=0x7ffff6a4d620,
var=<ssa_name 0x7ffff6a60630>, res=<tree 0x0>)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:2015
#23 0x00000000011579c8 in analyze_scalar_evolution (loop=0x7ffff6a4d620,
var=<ssa_name 0x7ffff6a60630>)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:2065
#24 0x0000000001157a85 in analyze_scalar_evolution_in_loop (
wrto_loop=0x7ffff6a4d620, use_loop=0x7ffff6a4d620,
version=<ssa_name 0x7ffff6a60630>, folded_casts=0x7fffffffd84f)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:2161
#25 0x0000000001159e6f in simple_iv (wrto_loop=0x7ffff6a4d620,
use_loop=0x7ffff6a4d620, op=<ssa_name 0x7ffff6a60630>, iv=0x7fffffffd8e0,
allow_nonconstant_step=true)
at /space/rguenther/tramp3d/trunk/gcc/tree-scalar-evolution.c:3269
#26 0x00000000011d65e1 in find_bivs (data=0x7fffffffda40)
at /space/rguenther/tramp3d/trunk/gcc/tree-ssa-loop-ivopts.c:1128
#27 0x00000000011d6c78 in find_induction_variables (data=0x7fffffffda40)
at /space/rguenther/tramp3d/trunk/gcc/tree-ssa-loop-ivopts.c:1297
#28 0x00000000011e8163 in tree_ssa_iv_optimize_loop (data=0x7fffffffda40,
loop=0x7ffff6a4d620)
at /space/rguenther/tramp3d/trunk/gcc/tree-ssa-loop-ivopts.c:7345
it's of course possible to punt much earlier for -ftrapv, but not sure if
that is desired.
More information about the Gcc-bugs
mailing list