public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
@ 2024-01-04  0:59 hp at gcc dot gnu.org
  2024-01-04 16:08 ` [Bug testsuite/113226] " ppalka at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hp at gcc dot gnu.org @ 2024-01-04  0:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113226
           Summary: [14 Regression]
                    testsuite/std/ranges/iota/max_size_type.cc fails for
                    cris-elf after r14-6888-ga138b99646a555
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hp at gcc dot gnu.org
  Target Milestone: ---

After r14-6888-ga138b99646a555, I see, for cris-elf (32-bit target, no 128bit):
FAIL: std/ranges/iota/max_size_type.cc  -std=gnu++20 execution test
FAIL: std/ranges/iota/max_size_type.cc  -std=gnu++26 execution test

And in the .log:

spawn cris-elf-run ./max_size_type.exe^
Inconsistency found: 1 0 -100 -100^
/x/gcc/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc:246: void
test02() [with bool signed_p = true; bool shorten_p = false]: Assertion '0'
failed.
program stopped with signal 6 (Aborted).
FAIL: std/ranges/iota/max_size_type.cc  -std=gnu++20 execution test

Changing all s/ok &=/VERIFY/ (plus adding one level of parentheses to one of
the lines) show:

/x/gcc/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc:217: void
test02() [with bool signed_p = true; bool shorten_p = false]: Assertion 'i*j ==
shorten_type(max_type(i)*j)' failed.
program stopped with signal 6 (Aborted).

Further instrumentation, adding among other lines:
```
          if (signed_p && ! shorten_p)
            std::cerr << "j == " << int64_t(j) << std::endl;
          if (!(i*j == shorten_type(max_type(i)*j)))
            {
              std::cerr << "i == " << int64_t(i) << ", j == " << j << ", i*j ==
" << int64_t(i*j) << ", max_type(i) == \
" << int64_t(max_type(i));
              std::cerr << ", max_type(i)*j == " << int64_t(max_type(i)*j) <<
std::endl;
            }
''' 

shows that this is (see above for template parameters):
i == 1, j == -100, i*j == 4294967196, max_type(i) == 1, max_type(i)*j == -100

and that large number is as you might guess, (unsigned) -100.

Not sure if this is a bug in the testcase or elsewhere, but I'll start my
guessing with testsuite.

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

end of thread, other threads:[~2024-05-07  7:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04  0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
2024-01-04 16:08 ` [Bug testsuite/113226] " ppalka at gcc dot gnu.org
2024-01-04 16:58 ` ppalka at gcc dot gnu.org
2024-01-04 17:57 ` hp at gcc dot gnu.org
2024-01-08 14:44 ` rguenth at gcc dot gnu.org
2024-01-08 22:13 ` [Bug target/113226] " hp at gcc dot gnu.org
2024-03-04  4:19 ` law at gcc dot gnu.org
2024-05-07  7:43 ` [Bug target/113226] [14/15 " rguenth 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).