https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108893
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- access attribute says if it is access, then it will be that. It does not say it MUST be accessed. That is what nonnull is for. >I didn't want to use __attribute__((nonnull)) because the optimizer may use >that knowledge to remove nullptr checks. It only uses it afterwards or inside the function. It cannot use nonnull attribute to optimize before the access has happened.