public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hp at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
Date: Thu, 04 Jan 2024 00:59:07 +0000	[thread overview]
Message-ID: <bug-113226-4@http.gcc.gnu.org/bugzilla/> (raw)

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.

             reply	other threads:[~2024-01-04  0:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04  0:59 hp at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113226-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).