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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[16/17 Regression] Wrong    |[16/17 Regression] Wrong
                   |code with ((int)a)>0 ?      |code with ((int)a)>0 ?
                   |(type1)a : CST              |(type1)a : CST since
                   |                            |r16-4585

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
          widest_int c1 = wi::mask<widest_int>(TYPE_PRECISION (type) - 1, 0);

The problem is the wrong precision is used here. it should have been c1_type or
from_type.

This only shows up with precision which differ by 1 which is why it does not
show up more.

This bug was introduced with r16-4585-ga4e033fb51d566 .

Reply via email to