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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2023-06-02 00:00:00         |2026-2-20

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So the way m_check_dangling_p works seems wrong from the get go.

We can only push one clobber on the hashtable and we only pop from the
hashtable if there was a direct store to that variable.

So for an example we might have:
```
a {v}= {CLOBBER(eos)};
c = b ? &a : &d;
*c = t;
if (b)
  e = a;
else
  e = d;
```
We would get a warning here. even though this is very much well defined.

I am thinking we should only do the warning inside the same BB for GCC 16; and
file a bug to improve how we handle this where we can have multiple layers for
the variable and such.
I have not checked the testcases for Wdangling-pointer though to see what is
currently being tried to be tested.

Also I am curious why it is checking CLOBBER_STORAGE_END rather than all
clobbers.

Reply via email to