https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104162
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 52293 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52293&action=edit untested patch Like this - it unfortunately regresses the diagnostic case in PR99673 again but should leave early __builtin_object_size untouched.