https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122326
--- Comment #7 from wujielun402 at gmail dot com --- (In reply to Andrew Pinski from comment #6) > Hmm, arr2 is unused. > So it is given the same address as arr1: > Partition 2: size 40 align 8 > arr2 arr1 > > > >which is clearly incorrect. > It is not totally incorrect as arr2 is unused. > > I know how to fix this. You're right that arr2 is unused. I suspect this may relate to GCC's stack layout strategy for unused variables, which would explain why the bug only manifests when -fstack-protector-strong is enabled.
