[Bug c++/98829] New: Different results with -O3 and custom quiet NaN

2021-01-25 Thread gnu at nemanjaboric dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98829 Bug ID: 98829 Summary: Different results with -O3 and custom quiet NaN Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug middle-end/98829] Different results with -O3 and custom quiet NaN

2021-01-25 Thread gnu at nemanjaboric dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98829 --- Comment #2 from Nemanja Boric --- Indeed, but there's a barrier in the code (is_empty) which doesn't let NaN values to enter the computation, so they shouldn't propagate.

[Bug middle-end/98829] Different results with -O3 and custom quiet NaN

2021-01-25 Thread gnu at nemanjaboric dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98829 --- Comment #3 from Nemanja Boric --- Changing: static constexpr std::uint64_t kMagicNumber = 1730; static constexpr std::uint64_t kCustomNaN = 0x7ff0 | kMagicNumber; to static inline std::uint64_t kMagicNumber = 1730;

[Bug middle-end/98829] Different results with -O3 and custom quiet NaN

2021-01-26 Thread gnu at nemanjaboric dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98829 --- Comment #5 from Nemanja Boric --- Yes, it seems that if the constants are `constexpr` or `static inline const` the custom payload is gone. I guess this is aligned to https://en.cppreference.com/w/cpp/types/numeric_limits/quiet_NaN "A NaN n