https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61563
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- Note that it's only for certain pairs of floating-point and integer type that the rounding mode doesn't matter. It's true for float and int, because the precision of float is small enough, compared to that of int, that values that are within range for int when converted rounding towards zero, but that might overflow and so cause a spurious "invalid" exception if converted in another rounding mode, can't be represented in float. But it's not true for double and int, for example (though maybe more cases are allowed by -fno-trapping-math).