https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122080
--- Comment #8 from Henri Menke <henri at henrimenke dot de> --- Correct, this is problem that I was trying to point out in my original report. When the optional argument is not present then the values of stride.1 and stride.3 are going to remain uninitialized and UBSan will pick that up. I believe that this is a bug in GCC that should be fixed.