[Bug middle-end/576] gcc performs invalid optimization with float operations when different rounding mode.

2023-11-21 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=576

--- Comment #7 from Vincent Lefèvre  ---
(In reply to Andrew Pinski from comment #6)
> That is because the code is GNU C90 and not C++ .

I've used gcc, not g++. But this fails even with -std=gnu90.

[Bug middle-end/576] gcc performs invalid optimization with float operations when different rounding mode.

2023-11-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=576

--- Comment #6 from Andrew Pinski  ---
(In reply to Vincent Lefèvre from comment #5)
> The -frounding-math option should solve the issue on this particular
> example. But on my machine, ld gives an "undefined reference to `_up'" error.

That is because the code is GNU C90 and not C++ .

[Bug middle-end/576] gcc performs invalid optimization with float operations when different rounding mode.

2023-11-21 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=576

Vincent Lefèvre  changed:

   What|Removed |Added

 CC||vincent-gcc at vinc17 dot net

--- Comment #5 from Vincent Lefèvre  ---
The -frounding-math option should solve the issue on this particular example.
But on my machine, ld gives an "undefined reference to `_up'" error.

For a more general bug, see PR34678.