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

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

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, qux is passing through the argument to quux (after it has been determined
that d after early inlining has [0, 1] range and thus d & 2 is always 0):
  # RANGE [0, 4294967295] NONZERO 4294967295
  _2 = (long unsigned int) e.3_1;
  qux (_2);
...
qux (long unsigned int g)
{
  long unsigned int g_5(D) = g;
  long unsigned int _1;
...
  <bb 2> [local count: 1073741824]:
  if (g_5(D) != 0)
    goto <bb 3>; [33.00%]
...
  # RANGE [1, 18446744073709551615]
  _1 = g_5(D);
  e.5_2 = e;
  e.6_3 = (int) e.5_2;
  quux (e.6_3, _1);

so I'd expect an intersection between the [0, 4294967295] range and
[1, 18446744073709551615], yielding [1, 4294967295], but instead it intersects
[0, 4294967295] with the pointer-ish unrelated ~[0B, 0B] where the effect is
actually the same.  I think the #c3 patch is fairly obviously correct, but
there is still the question if there isn't something else broken too.

Reply via email to