[Bug c++/88630] Incorrect float negating together with convertion to int on SH4

zavadovsky.yan at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Dec 28 13:43:00 GMT 2018


--- Comment #1 from Zavadovsky Yan <zavadovsky.yan at gmail dot com> ---
Rewriting code as
float float_val = ....;
int int_val = -(int)float_val;
avoids bug.

And rewriting code as
double float_val = ....;
int int_val = -float_val;
also avoids bug.

More information about the Gcc-bugs mailing list