This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/52415] memcpy to local variable generates unnecessary stack frame for armv7


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52415

--- Comment #2 from Jay Foad <jay.foad at gmail dot com> 2012-02-28 11:51:00 UTC ---
> On the tree level nothing guarantees that 'p' is properly aligned.

This is a digression, but what about C99 (Committee Draft -- April 12, 2011)
6.3.2.3p7:

"A pointer to an object type may be converted to a pointer to a different
object type. If the resulting pointer is not correctly aligned for the
referenced type, the behavior is undefined."

Doesn't that guarantee that p is properly aligned? If not, how can I assert
that p *is* properly aligned, so the compiler can turn the memcpy into an
aligned load? Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]