https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98607
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- No. You need to put the code that is done with different rounding modes into separate functions (and ensure those functions aren't inlined into their caller).