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.