https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104336
Andrew Macleod <amacleod at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amacleod at redhat dot com --- Comment #2 from Andrew Macleod <amacleod at redhat dot com> --- Huh. This looks earily familiar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329 as well. That PR documents why the code sequence isn't handled well by the optimizers in this release... we improve analysis on the length calculation, but not on the pointer side... so we leave dead code that the warning system complains about. Presumably this would also fix that?