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

            Bug ID: 78681
           Summary: [7 Regressions] ICE in determine_value_range, at
                    tree-ssa-loop-niter.c:413
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with r243108, works with -O1, different backtrace than the one in PR78365

$ cat mklev.i
typedef char a;
typedef struct { a b; } c;
a d, e, f, l, m;
c n;
int o();
static void p(c *, int, int, int, int);
void p(cc, g, h, i, j) c *cc;
a g, h, i, j;
{
  a k;
  for (; k <= j; k++)
    if (o(g, k))
      for (; i; k++)
        if (d)
          cc->b = g;
}
void r(q) int q;
{
  p(&n, m, l, f, 1);
  p(&n, m, e, f, e - 1);
}

$ gcc -c -O2 mklev.i
mklev.i: In function 'p.constprop':
mklev.i:7:6: internal compiler error: in determine_value_range, at
tree-ssa-loop-niter.c:413
 void p(cc, g, h, i, j) c *cc;
      ^
0xb0ce8b determine_value_range
        ../../src/gcc/tree-ssa-loop-niter.c:413
0xb0d3a5 bound_difference
        ../../src/gcc/tree-ssa-loop-niter.c:743
0xb0d3a5 number_of_iterations_cond
        ../../src/gcc/tree-ssa-loop-niter.c:1714
0xb0d3a5 number_of_iterations_exit_assumptions(loop*, edge_def*,
tree_niter_desc*, gcond**, bool)  
        ../../src/gcc/tree-ssa-loop-niter.c:2290
0xb0e473 number_of_iterations_exit_assumptions(loop*, edge_def*,
tree_niter_desc*, gcond**, bool)  
        ../../src/gcc/tree-ssa-loop-niter.c:2374
0xb0e473 number_of_iterations_exit(loop*, edge_def*, tree_niter_desc*, bool,
bool)
        ../../src/gcc/tree-ssa-loop-niter.c:2357
0xb0e7b9 estimate_numbers_of_iterations_loop
        ../../src/gcc/tree-ssa-loop-niter.c:3793
0xb10ed9 loop_exits_before_overflow
        ../../src/gcc/tree-ssa-loop-niter.c:4197
0xb10ed9 scev_probably_wraps_p(tree_node*, tree_node*, tree_node*, gimple*,
loop*, bool)
        ../../src/gcc/tree-ssa-loop-niter.c:4453
0x10902c2 convert_affine_scev(loop*, tree_node*, tree_node**, tree_node**,
gimple*, bool, tree_node*)
        ../../src/gcc/tree-chrec.c:1271
0x10905e7 chrec_convert_1
        ../../src/gcc/tree-chrec.c:1329
0xaa88a9 follow_ssa_edge_in_rhs
        ../../src/gcc/tree-scalar-evolution.c:1139
0xaa88a9 follow_ssa_edge
        ../../src/gcc/tree-scalar-evolution.c:1364
0xaa7043 analyze_evolution_in_loop
        ../../src/gcc/tree-scalar-evolution.c:1475
0xaa7043 interpret_loop_phi
        ../../src/gcc/tree-scalar-evolution.c:1647
0xaa7043 analyze_scalar_evolution_1
        ../../src/gcc/tree-scalar-evolution.c:2095
0xaa74ae analyze_scalar_evolution(loop*, tree_node*)
        ../../src/gcc/tree-scalar-evolution.c:2145
0xaaaa4d scev_const_prop()
        ../../src/gcc/tree-scalar-evolution.c:3847
Please submit a full bug report,
with preprocessed source if appropriate.

Reply via email to