This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/26721] [4.2 Regression]: Gcc generates unaligned access
- From: "sje at cup dot hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2006 22:25:03 -0000
- Subject: [Bug target/26721] [4.2 Regression]: Gcc generates unaligned access
- References: <bug-26721-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from sje at cup dot hp dot com 2006-03-16 22:25 -------
Here is a cut down test case, I guess GCC is trying to map the strncpy into an
integer move without taking alignment into account.
extern char *strncpy (char *, const char *, __SIZE_TYPE__);
int main()
{
const char *const foo = "hello world";
char dst [64];
strncpy (dst + 1, foo + 1, 4);
return 0;
}
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-03-16 22:25:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26721