public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/106144] New: wide_int shifted_mask() and mask() do not agree
@ 2022-06-30 11:03 aldyh at gcc dot gnu.org
  2022-06-30 18:18 ` [Bug middle-end/106144] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2022-06-30 11:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106144
           Summary: wide_int shifted_mask() and mask() do not agree
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aldyh at gcc dot gnu.org
                CC: amacleod at redhat dot com, mikestump at comcast dot net,
                    rsandifo at gcc dot gnu.org
  Target Milestone: ---

A mask of 128 bits should match a shifted mask of 128 bits where the shift is
0, but the following assert is failing:

      {
        wide_int mask1 = wi::mask (128, false, 128);
        wide_int mask2 = wi::shifted_mask (0, 128, false, 128);
        mask1.dump ();
        mask2.dump ();
        gcc_assert (mask1 == mask2);
      }

The output is:

[...,0xffffffffffffffff], precision = 128
[0xffffffffffffffff,0xffffffffffffffff], precision = 128

I would expect both masks to be the same.

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

end of thread, other threads:[~2023-05-04  7:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 11:03 [Bug middle-end/106144] New: wide_int shifted_mask() and mask() do not agree aldyh at gcc dot gnu.org
2022-06-30 18:18 ` [Bug middle-end/106144] " jakub at gcc dot gnu.org
2022-06-30 18:50 ` jakub at gcc dot gnu.org
2022-07-01  8:09 ` aldyh at gcc dot gnu.org
2022-07-01  9:19 ` cvs-commit at gcc dot gnu.org
2022-07-30  9:34 ` cvs-commit at gcc dot gnu.org
2022-11-04  8:30 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:18 ` cvs-commit at gcc dot gnu.org
2023-05-04  7:18 ` jakub 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).