[Bug tree-optimization/38819] [4.2/4.3/4.4 Regression] trapping expression wrongly hoisted out of loop

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 16 11:22:00 GMT 2009



------- Comment #3 from jakub at gcc dot gnu dot org  2009-01-16 11:21 -------
-O2 -fno-tree-pre works.  tree_could_trap_p is true for integer division by
non-constant (or 0), but we don't seem to have stmt_could_trap_p.  Perhaps it
should be added and PRE should considfer it?  In rtl land, may_trap_p is also
true in this case and so RTL optimizers don't try to hoist this out of loops.


-- 


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



More information about the Gcc-bugs mailing list