https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90204
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Hongtao.liu from comment #7) > Yes, C++ with NRV optization, so the alignment of <retval>(res) is 4. > and the alignment of res is 16 in C. > > g++/test.i.158t.vect: > > ../test.i:8:23: note: recording new base alignment for &<retval> > alignment: 4 > misalignment: 0 > > gcc/test.i.158t.vect: > > ../test.i:8:5: note: recording new base alignment for &res > alignment: 16 > misalignment: 0 > > When alignment of res is 16, that triggers loop peeling of vectorization. > Why does struct v have different alignments in C and C++?