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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2025-07-18

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  # PT = { D.371302 D.371303 }
  # ALIGN = 8, MISALIGN = 0
  # _129 = PHI <&D.371302(3), &D.371303(5)>
  # .MEM_461 = VDEF <.MEM_458>
  # USE = nonlocal escaped { D.371302 D.371303 }
  # CLB = nonlocal escaped
  .UBSAN_NULL (_129, 0B, 8);
  # VUSE <.MEM_461>
  avail_79 = *_129;

So basically phiprop no longer does it work. so we missed out a lot.

I can't get the warning with:
```
int f(int a, int *p)
{
  __SIZE_TYPE__ t = 1;
  __SIZE_TYPE__ t1 = 0;
  int y = 0;
  __SIZE_TYPE__ *tt;
  if (a)
    tt = &t;
  else tt = &t1;
  if ((long long)*tt > 1)
  __builtin_memmove(&y, p, *tt);
  return y;
}
```

Or otherwise.

One thing I noticed is that we get:
```
Folding statement: __n.7_137 = (long unsigned int) _133;
 Registering value_relation (__n.7_137 pe64 _133) (bb9) at __n.7_137 = (long
unsigned int) _133;
gimple_simplified to __n.7_137 = avail_96;
Folded into: __n.7_137 = avail_96;
```

In VRP but we don't prop avail_96 into all of __n.7_137 which might be enough
not to produce the warning but I could be wrong.

Reply via email to