[Bug target/52415] memcpy to local variable generates unnecessary stack frame for armv7
mhlavink at redhat dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 5 08:13:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52415
--- Comment #6 from Michal Hlavinka <mhlavink at redhat dot com> 2012-04-05 08:12:54 UTC ---
We can see this bug on avr target too.
Following code does not work:
DirEnt tmp = eeFs.files[i_fileId1];
eeFs.files[i_fileId1] = eeFs.files[i_fileId2];
eeFs.files[i_fileId2] = tmp;
workaround from comment #4 helps
DirEnt tmp;
__builtin_memcpy(&tmp, __builtin_assume_aligned(&eeFs.files[i_fileId1],
sizeof(DirEnt)), sizeof(DirEnt));
...
...
So it seems it's the same bug
More information about the Gcc-bugs
mailing list