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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-08-29
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The upcast to the base class requires adjustment if the pointer is non-null, so
the GIMPLE for the call is funcyyy (d != 0B ? &d->D.2287 : 0B). This triggers
the warning.

Either we shouldn't warn here, because the null argument is emitted by the
compiler not the user code, or we should optimize based on the nonnull
attribute to perform the adjustment unconditionally: funcyyy (&d->D.2287)

Reply via email to