https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97256
--- Comment #6 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> --- My apologies, I misread the testcase. Yes, this is UB.
richard-gccbugzilla at metafoo dot co.uk via Gcc-bugs Thu, 01 Oct 2020 21:50:45 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97256
--- Comment #6 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> --- My apologies, I misread the testcase. Yes, this is UB.