This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/56478] [4.8 Regression] ICE: Floating point exception in tree_estimate_probability


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]