http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53805
--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-06-29 14:43:30 UTC --- On Fri, 29 Jun 2012, rguenth at gcc dot gnu.org wrote: > We happily remove dead trapping statements: > > void foo(double x, int y) > { > 1 / x; Bug with -ftrapping-math. Maybe a known bug - there are plenty of open bugs for ways in which -ftrapping-math -frounding-math fail to implement standard C semantics - but a bug. > 1 / y; Arguably a bug with -ftrapv (again, the option could reasonably be split into different cases), but not otherwise.