public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/91099] constexpr vs -frounding-math
[not found] <bug-91099-4@http.gcc.gnu.org/bugzilla/>
@ 2021-07-27 5:34 ` pinskia at gcc dot gnu.org
2021-07-27 7:20 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-27 5:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91099
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 96862 which had a patch committed.
*** This bug has been marked as a duplicate of bug 96862 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/91099] constexpr vs -frounding-math
[not found] <bug-91099-4@http.gcc.gnu.org/bugzilla/>
2021-07-27 5:34 ` [Bug c++/91099] constexpr vs -frounding-math pinskia at gcc dot gnu.org
@ 2021-07-27 7:20 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: glisse at gcc dot gnu.org @ 2021-07-27 7:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91099
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
Interestingly, Jakub's patch has the same issue my patch here had: "defeated by
constexpr-caching if we change flag_rounding_math in the middle of a
translation unit".
constexpr double f(){return 1./3.;}
#if BUG
__attribute__((optimize("no-rounding-math")))
double g(){
double d=f();
return d;
}
#endif
__attribute__((optimize("rounding-math")))
double h(){
double d=f();
return d;
}
The presence of g changes the code we generate for h. At least we don't seem to
reuse the cache from a different value of manifestly_const_eval, so maybe
changing rounding_math is just not supported and this goes in the list of
issues with attribute optimize.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-27 7:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-91099-4@http.gcc.gnu.org/bugzilla/>
2021-07-27 5:34 ` [Bug c++/91099] constexpr vs -frounding-math pinskia at gcc dot gnu.org
2021-07-27 7:20 ` glisse at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).