http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55875



--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-04 
12:24:12 UTC ---

ssa name _12

  type long unsigned int

  base 4294967295

  step 1

ssa name _13

  type long unsigned int

  base 34359738360

  step 8

ssa name _14

  type const struct A *

  base a_4 + 34359738360

  step 8

  base object (void *) a_4



all look wrong to me, it ignores the wrapping in the narrower type.



OT, I wonder why number of iterations analysis doesn't figure out smaller

number:

Analyzing # of iterations of loop 1

  exit condition [1, + , 1] < (unsigned int) n_5

  bounds on difference of bases: 0 ... 4294967294

  result:

    # of iterations (unsigned int) n_5 + 4294967295, bounded by 4294967294

The loop condition is:

  i_18 = i_21 + 1;

  if (i_18 < _20)

and _20 is:

  _20 = (unsigned int) n_5;

where

  short unsigned int n;

thus, I'd thought we should figure out from that that i_18 will be at most

0xffff (highest possible n_5 is 0xffff).

But that is 4.9 material likely, while the ivopts? bug is a severe 4.8 issue.

Reply via email to