public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/109085] New: [13 Regression] Maybe a wrong code in fmt package since r13-6361-g8020c9c42349f51f
@ 2023-03-09 23:22 marxin at gcc dot gnu.org
  2023-03-09 23:23 ` [Bug target/109085] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-03-09 23:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109085

            Bug ID: 109085
           Summary: [13 Regression] Maybe a wrong code in fmt package
                    since r13-6361-g8020c9c42349f51f
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: uros at gcc dot gnu.org
  Target Milestone: ---

Noticed in the fmt package:

[  134s] Expected equality of these values:
[  134s]   "44.000000000000"
[  134s]   fmt::format("{:%S}", std::chrono::duration<float, std::pico>(
1.54213895E+26))
[  134s]     Which is: "16.430007934570"

which I was able to reduce into:

$ cat fmt3.C
static float
__attribute__((noinline, noipa))
foo(float val)
{
  return __builtin_fmodf(val / 1000000000000L, 60);
}

int main()
{
  float rem = foo (1.54213895E+26);
  __builtin_printf ("rem=%f\n", rem);
  if (rem != 44.0)
    __builtin_abort ();

  return 0;
}

$ g++ fmt3.C -O2 -m32 && ./a.out
rem=16.430008
Aborted (core dumped)

while:
$ g++ fmt3.C -m32 && ./a.out
rem=44.000000

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-10  8:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 23:22 [Bug target/109085] New: [13 Regression] Maybe a wrong code in fmt package since r13-6361-g8020c9c42349f51f marxin at gcc dot gnu.org
2023-03-09 23:23 ` [Bug target/109085] " marxin at gcc dot gnu.org
2023-03-09 23:29 ` pinskia at gcc dot gnu.org
2023-03-09 23:30 ` marxin at gcc dot gnu.org
2023-03-09 23:30 ` marxin at gcc dot gnu.org
2023-03-09 23:39 ` pinskia at gcc dot gnu.org
2023-03-09 23:40 ` pinskia at gcc dot gnu.org
2023-03-10  8:21 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).