https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88823
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-01-14 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The flag is usually harmless and might only result in missed optimizations down the road. At some point it caused VRP to ICE eventually. One -1(OVF) is built here: #4 0x000000000137f9d2 in get_computation_aff_1 (loop=0x7ffff6888ee0, at= <gimple_cond 0x7ffff69cb280>, use=0x31d8e00, cand=0x31d8f90, aff_inv=0x7fffffffd130, aff_var=0x7fffffffd2f0, prat=0x7fffffffd100) at /space/rguenther/src/gcc-sccvn/gcc/tree-ssa-loop-ivopts.c:3947 (gdb) l 3942 if (stmt_after_increment (loop, cand, at)) 3943 { 3944 aff_tree cstep_aff; 3945 3946 if (common_type != uutype) 3947 cstep_common = fold_convert (common_type, cstep); where cstep is 4294967295 and common_type is int. That's probably harmless as we just feed it back to tree-affine. Then there's #4 0x0000000001383a5a in may_eliminate_iv (data=0x7fffffffd810, use=0x31d8e00, cand=0x31d90b0, bound=0x7fffffffd638, comp=0x7fffffffd5c4) at /space/rguenther/src/gcc-sccvn/gcc/tree-ssa-loop-ivopts.c:5147 5147 *bound = fold_convert (TREE_TYPE (cand->iv->base), (gdb) l 5142 } 5143 } 5144 5145 cand_value_at (loop, cand, use->stmt, desc->niter, &bnd); 5146 5147 *bound = fold_convert (TREE_TYPE (cand->iv->base), 5148 aff_combination_to_tree (&bnd)); where a similar issue happens (unsigned -> signed convert). This is the one ending up in the IL.