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



--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-28 
08:15:19 UTC ---

There are other issues, like e.g. using int type to store step, with:

      if (host_integerp (iv0.step, 0))

        step = tree_low_cst (iv0.step, 0);

guard for that.  host_integerp checks if the value fits into singed

HOST_WIDE_INT, not int, so if the step will be 0x12300000000ULL, you'll happily

set step to 0, then divide by zero, etc.

I'd say safest would be to store step as tree (just verify it is INTEGER_CST),

and do all the arithmetics on trees, then look if we could fold it into a

non-TREE_OVERFLOW constant.

Reply via email to