Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt 9.0 tests fail on i386 #2975

Closed
zhsj opened this issue Jul 7, 2022 · 8 comments
Closed

fmt 9.0 tests fail on i386 #2975

zhsj opened this issue Jul 7, 2022 · 8 comments

Comments

@zhsj
Copy link
Contributor

zhsj commented Jul 7, 2022

Log:

https://buildd.debian.org/status/fetch.php?pkg=fmtlib&arch=i386&ver=9.0.0%2Bds1-1&stamp=1657135081&raw=0

88% tests passed, 3 tests failed out of 24

Total Test time (real) =  22.49 sec

The following tests FAILED:
	  3 - chrono-test (Failed)
	  7 - format-test (Failed)
	  8 - format-impl-test (Failed)
./test/chrono-test.cc:560: Failure
Expected equality of these values:
  "44.000000000000"
  fmt::format("{:%S}", std::chrono::duration<float, std::pico>( 1.54213895E+26))
    Which is: "16.437500000000"
[  FAILED  ] chrono_test.special_durations (0 ms)
./test/format-impl-test.cc:360: Failure
Expected equality of these values:
  s
    Which is: "5.5099196966553210909853471157086794699e-4928"
  "42"
[  FAILED  ] format_impl_test.write_float128 (1 ms)
./test/format-test.cc:1991: Failure
Expected equality of these values:
  fmt::to_string(__float128(0.5))
    Which is: "5.5077973690462315819595188003364951136e-4928"
  "0.5"
[  FAILED  ] format_test.to_string (0 ms)

@vitaut
Copy link
Contributor

vitaut commented Jul 7, 2022

Thanks for reporting. Two of the three failures are the same as in #2969 so I'll merge this issue and add a note regarding the chrono-test failure there.

@vitaut
Copy link
Contributor

vitaut commented Jul 10, 2022

The first two failures have been fixed in #2969, but the chrono-test turned out to be unrelated. Reopening.

@vitaut
Copy link
Contributor

vitaut commented Jul 12, 2022

Managed to repro on bento/debian-10.10-i386.

@vitaut
Copy link
Contributor

vitaut commented Jul 12, 2022

The problem is that fmod(154213890000000.0f, 60.0f) gives different results with optimizations disabled (44) and enabled (16.437500000000) on this system.

@vitaut
Copy link
Contributor

vitaut commented Jul 13, 2022

chrono-test should be fixed in d82e1a1.

@vitaut vitaut closed this as completed Jul 13, 2022
@zhsj
Copy link
Contributor Author

zhsj commented Jul 14, 2022

https://buildd.debian.org/status/package.php?p=fmtlib&suite=experimental

The tests have passed now. 👍

@vitaut
Copy link
Contributor

vitaut commented Jul 14, 2022

Thanks for checking!

mtremer pushed a commit to ipfire/ipfire-2.x that referenced this issue Nov 28, 2022
- Update from version 9.0.0 to 9.1.0
- Update of rootfile
- Changelog
    9.1.0 - 2022-08-27
	* ``fmt::formatted_size`` now works at compile time
		  `#3026 <https://github.com/fmtlib/fmt/pull/3026>`_
			  For example (`godbolt <https://godbolt.org/z/1MW5rMdf8>`__):
			   .. code:: c++
			     #include <fmt/compile.h>
			     int main() {
			       using namespace fmt::literals;
			       constexpr size_t n = fmt::formatted_size("{}"_cf, 42);
			       fmt::print("{}\n", n); // prints 2
			     }
	* Fixed handling of invalid UTF-8
		  `#3038 <https://github.com/fmtlib/fmt/pull/3038>`_,
		  `#3044 <https://github.com/fmtlib/fmt/pull/3044>`_,
		  `#3056 <https://github.com/fmtlib/fmt/pull/3056>`_
	* Improved Unicode support in ``ostream`` overloads of ``print``
		  `#2994 <https://github.com/fmtlib/fmt/pull/2994>`_,
		  `#3001 <https://github.com/fmtlib/fmt/pull/3001>`_,
		  `#3025 <https://github.com/fmtlib/fmt/pull/3025>`_
	* Fixed handling of the sign specifier in localized formatting on systems with
	   32-bit ``wchar_t``
		  `#3041 <https://github.com/fmtlib/fmt/issues/3041>`_).
	* Added support for wide streams to ``fmt::streamed``
		  `#2994 <https://github.com/fmtlib/fmt/pull/2994>`_
	* Added the ``n`` specifier that disables the output of delimiters when
	   formatting ranges
		  `#2981 <https://github.com/fmtlib/fmt/pull/2981>`_,
		  `#2983 <https://github.com/fmtlib/fmt/pull/2983>`_
			  For example (`godbolt <https://godbolt.org/z/roKqGdj8c>`__):
			   .. code:: c++
			     #include <fmt/ranges.h>
			     #include <vector>
			     int main() {
			       auto v = std::vector{1, 2, 3};
			       fmt::print("{:n}\n", v); // prints 1, 2, 3
			     }
	* Worked around problematic ``std::string_view`` constructors introduced in C++23
		  `#3030 <https://github.com/fmtlib/fmt/issues/3030>`_,
		  `#3050 <https://github.com/fmtlib/fmt/issues/3050>`_
	* Improve handling (exclusion) of recursive ranges
		  `#2968 <https://github.com/fmtlib/fmt/issues/2968>`_,
		  `#2974 <https://github.com/fmtlib/fmt/pull/2974>`_
	* Improved error reporting in format string compilation
		  `#3055 <https://github.com/fmtlib/fmt/issues/3055>`_
	* Improved the implementation of
		  `Dragonbox <https://github.com/jk-jeon/dragonbox>`_, the algorithm used for
		   the default floating-point formatting
		  `#2984 <https://github.com/fmtlib/fmt/pull/2984>`_
	* Fixed issues with floating-point formatting on exotic platforms.
	* Improved the implementation of chrono formatting
		  `#3010 <https://github.com/fmtlib/fmt/pull/3010>`_
	* Improved documentation
		  `#2966 <https://github.com/fmtlib/fmt/pull/2966>`_,
		  `#3009 <https://github.com/fmtlib/fmt/pull/3009>`_,
		  `#3020 <https://github.com/fmtlib/fmt/issues/3020>`_,
		  `#3037 <https://github.com/fmtlib/fmt/pull/3037>`_
	* Improved build configuration
		  `#2991 <https://github.com/fmtlib/fmt/pull/2991>`_,
		  `#2995 <https://github.com/fmtlib/fmt/pull/2995>`_,
		  `#3004 <https://github.com/fmtlib/fmt/issues/3004>`_,
		  `#3007 <https://github.com/fmtlib/fmt/pull/3007>`_,
		  `#3040 <https://github.com/fmtlib/fmt/pull/3040>`_
	* Fixed various warnings and compilation issues
		  `#2969 <https://github.com/fmtlib/fmt/issues/2969>`_,
		  `#2971 <https://github.com/fmtlib/fmt/pull/2971>`_,
		  `#2975 <https://github.com/fmtlib/fmt/issues/2975>`_,
		  `#2982 <https://github.com/fmtlib/fmt/pull/2982>`_,
		  `#2985 <https://github.com/fmtlib/fmt/pull/2985>`_,
		  `#2988 <https://github.com/fmtlib/fmt/issues/2988>`_,
		  `#3000 <https://github.com/fmtlib/fmt/issues/3000>`_,
		  `#3006 <https://github.com/fmtlib/fmt/issues/3006>`_,
		  `#3014 <https://github.com/fmtlib/fmt/issues/3014>`_,
		  `#3015 <https://github.com/fmtlib/fmt/issues/3015>`_,
		  `#3021 <https://github.com/fmtlib/fmt/pull/3021>`_,
		  `#3023 <https://github.com/fmtlib/fmt/issues/3023>`_,
		  `#3024 <https://github.com/fmtlib/fmt/pull/3024>`_,
		  `#3029 <https://github.com/fmtlib/fmt/pull/3029>`_,
		  `#3043 <https://github.com/fmtlib/fmt/pull/3043>`_,
		  `#3052 <https://github.com/fmtlib/fmt/issues/3052>`_,
		  `#3053 <https://github.com/fmtlib/fmt/pull/3053>`_,
		  `#3054 <https://github.com/fmtlib/fmt/pull/3054>`_

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
@marxin
Copy link

marxin commented Mar 9, 2023

The problem is that fmod(154213890000000.0f, 60.0f) gives different results with optimizations disabled (44) and enabled (16.437500000000) on this system.

Hey, I noticed similar symptoms with GCC 13 compiler:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109085

You might be able to share more details on that, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants