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

Failing tests on i686 with GCC 13 #3337

Closed
marxin opened this issue Mar 10, 2023 · 3 comments
Closed

Failing tests on i686 with GCC 13 #3337

marxin opened this issue Mar 10, 2023 · 3 comments

Comments

@marxin
Copy link

marxin commented Mar 10, 2023

As mentioned already here (#2975 (comment)), after the recent GCC change gcc-mirror/gcc@8020c9c, the following test-case fails now:

[   23s] /home/abuild/rpmbuild/BUILD/fmt-9.1.0/test/chrono-test.cc:571: Failure
[   23s] Expected equality of these values:
[   23s]   "44.000000000000"
[   23s]   fmt::format("{:%S}", std::chrono::duration<float, std::pico>( 1.54213895E+26))
[   23s]     Which is: "16.430007934570"
[   23s] [  FAILED  ] chrono_test.special_durations (0 ms)

A reduced test case can be seen here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109085.

This is related to the excess precision provided by X87 and can be fixed with either -ffloat-store or -fexcess-precision=standard. Note that the default precision is going to change for GCC 13: https://gcc.gnu.org/gcc-13/porting_to.html#excess-precision.

One more comment about using -fexcess-precision=standard on i686, apparently, it breaks the following test-case:

[   43s] /home/abuild/rpmbuild/BUILD/fmt-9.1.0/test/format-test.cc:1395: Failure
[   43s] Expected equality of these values:
[   43s]   "0.10000000149011612"
[   43s]   fmt::format("{}", double(0.1f))
[   43s]     Which is: "0.1"
[   43s] [  FAILED  ] format_test.prettify_float (0 ms)

Can you please take a look, @vitaut?

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Mar 14, 2023
https://build.opensuse.org/request/show/1071110
by user jengelh + dimstar_suse
- Use -ffloat-store as a fix for excessive precision provided
  by X87 on i686 target (fmtlib/fmt#3337). (forwarded request 1070626 from marxin)
@vitaut
Copy link
Contributor

vitaut commented Mar 18, 2023

Please provide a godbolt repro.

@marxin
Copy link
Author

marxin commented Mar 19, 2023

https://godbolt.org/z/q8PPYKMM5

@vitaut
Copy link
Contributor

vitaut commented Jul 20, 2023

Fixed the overspecified chrono test and removed the nonportable float test since it doesn't add much value (e475859). Thanks for reporting.

@vitaut vitaut closed this as completed Jul 20, 2023
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Jul 10, 2024
https://build.opensuse.org/request/show/1071110
by user jengelh + dimstar_suse
- Use -ffloat-store as a fix for excessive precision provided
  by X87 on i686 target (fmtlib/fmt#3337). (forwarded request 1070626 from marxin)
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

2 participants