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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This changed with r224283.
Note, I wouldn't use volatile in any testcase like this, but
int
foo (int k)
{
  int t = 1 << ((1 / k) << 8);
  if (t != 1)
    __builtin_abort ();
  return 0;
}
can serve the same purpose.  That said, about the zero/non-zero bits, it is
even more complicated in this case, because e.g. 1 / -1 has all bits set, the
thing is just that it is then undefined behavior for the shift.
Wonder what optimization performed this at the RTL level and if it gets all the
cases right.

Reply via email to