https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325
Sebastian Dröge <slomo at coaxion dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |slomo at coaxion dot net
--- Comment #1 from Sebastian Dröge <slomo at coaxion dot net> ---
To provide more details, the code in question is basically
float x = ...;
int y = x * INTEGER_LITERAL;
if x < 1.0, this always resulted in 0. Adding casts like
int y = (int) ((double) x * (double) INTEGER_LITERAL);
fixed it.
The problem only happened with -O1 and -O2 on ARM(v7), not with -O0. And also
went away after adding some debug printf() around the code in question.
gcc 4.9 was used here.