https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110501
--- Comment #6 from Cheyenne Wills <cheyenne.wills at gmail dot com> --- Just another bit of information. Specifying just -Werror=use-after-free appears to be not not enough to trigger the problem. Using -Wall however does trigger the problem. (tried on gcc-12 and gcc-13)