[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-08-01 Thread ewlu at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 Edwin Lu changed: What|Removed |Added CC||ewlu at rivosinc dot com --- Comment #12 fro

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-08-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 Jonathan Wakely changed: What|Removed |Added Keywords||patch --- Comment #11 from Jonathan W

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-05-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2024-05-15 Resolution|INVALID

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-05-13 Thread andrew at sifive dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 --- Comment #9 from Andrew Waterman --- For my M1 running Ventura 13.6, NaN payloads _are_ propagated, sign bit included. This test prints fffc0080: int main() { volatile long long ll = 0x8010; volatile double d; memcpy((char*

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-05-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 --- Comment #8 from Jonathan Wakely --- Hmm, you could be right. It looks like the printf in Apple libc doesn't print "-nan" even when not converting from float to double. According to https://developer.r-project.org/Blog/content/post/2020-11-0

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-05-10 Thread andrew at sifive dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 Andrew Waterman changed: What|Removed |Added CC||andrew at sifive dot com --- Comment

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-05-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 --- Comment #6 from Jonathan Wakely --- (In reply to Joseph S. Myers from comment #2) > If a conversion from float to double (for passing in variable arguments) > occurs at runtime on RISC-V, that will produce a positive-signed NaN (that's > wha

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-01-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 --- Comment #5 from Jonathan Wakely --- Maybe we could make it work for std::ostream with something like: --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -233,7 +233,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-01-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRME

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-01-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 --- Comment #3 from Andrew Pinski --- and since __builtin_printf is variadic function, floats are promoted to double causing the removal of the payload of NaN on RISCV at runtime ...

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-01-24 Thread jsm28 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 --- Comment #2 from Joseph S. Myers --- If a conversion from float to double (for passing in variable arguments) occurs at runtime on RISC-V, that will produce a positive-signed NaN (that's what the RISC-V floating-point instructions do). Cf. ht

[Bug target/113578] Incorrect sign printed for -nan on RISC-V

2024-01-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113578 Jonathan Wakely changed: What|Removed |Added Summary|Incorrect signbit for -nan |Incorrect sign printed for