[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1059340: marked as done (libstdc++6:riscv64: stream output for NaN is optimization-dependent)



Your message dated Thu, 25 Jan 2024 10:52:23 +0100
with message-id <f4463716-53d8-4282-9eef-9527768ea230@debian.org>
and subject line closing as invalid, as suggested by upstream
has caused the Debian Bug report #1059340,
regarding libstdc++6:riscv64: stream output for NaN is optimization-dependent
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1059340: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059340
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libstdc++6
Version: 13.2.0-9

Streaming a negative NaN float produces "-nan" with g++ -O0 and "nan"
with g++ -O1 or above:

	$ cat >mwe.cc <<EOF
	> // Copyright 2023 Google LLC
	> // SPDX-License-Identifier: Apache-2.0
	> 
	> #include <bit>
	> #include <iostream>
	> 
	> int main() { std::cerr << std::bit_cast<float>(0xfff80000) << '\n'; }
	> EOF
	$ g++ -std=c++20 -O0 mwe.cc && ./a.out
	nan
	$ g++ -std=c++20 -O1 mwe.cc && ./a.out
	-nan
	$ clang++ -std=c++20 -O0 mwe.cc && ./a.out
	nan
	$ clang++ -std=c++20 -O1 mwe.cc && ./a.out
	-nan

For comparison, on amd64, this program always produces "-nan",
regardless of optimization level.

Tested with g++-13 13.2.0-9 and clang-16 1:16.0.6-19.

--- End Message ---
--- Begin Message ---
closing as invalid, as suggested by upstream.

--- End Message ---

Reply to: