[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-12-03 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 Ramana Radhakrishnan changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-16 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 Mikael Pettersson changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-16 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #11 from Mikael Pettersson 2010-11-16 13:40:32 UTC --- The test cases work with gcc-4.3.5. For arm it generates the following for the __builtin_memcpy case: set_by_memcpy: @ args = 0, pretend = 0, frame = 8 @ frame_n

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-16 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #10 from Mikael Pettersson 2010-11-16 13:08:53 UTC --- The test cases also fail with gcc-4.5.1 on sparc64-linux. On that platform alignment errors are fatal and the program dies with a SIGBUS on the misaligned int-sized write generat

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-16 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #9 from Mikael Pettersson 2010-11-16 12:21:20 UTC --- With gcc-4.5.1, the plain assignment is preserved until 141r.expand, which expands it to a bitfield assignment due to the misalignment check in expr.c:store_field lines 5836-5840.

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-16 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #8 from Mikael Pettersson 2010-11-16 10:35:41 UTC --- The misaligned __builtin_memcpy was fixed for 4.6 by r163189, Richard Guenther's conservative alignment tracking (2nd try) patch: http://gcc.gnu.org/ml/gcc-patches/2010-08/msg00831

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #7 from Richard Guenther 2010-11-15 22:49:21 UTC --- Sounds like the very old bad alignment issues for string-alignment targets, should be fixed (conservatively) in 4.6.

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #6 from Andrew Pinski 2010-11-15 21:32:45 UTC --- I think the biggest issue is what is the type of &p->number ? is it an pointer to an int or a pointer to an int with an alignment of 1.

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 Mikael Pettersson changed: What|Removed |Added CC||mikpe at it dot uu.se --- Comment #5

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #4 from Mikael Pettersson 2010-11-15 21:04:11 UTC --- Created attachment 22409 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22409 gcc-4.5.2 output for pr46483.c

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #3 from Mikael Pettersson 2010-11-15 21:02:56 UTC --- Created attachment 22408 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22408 test case showing how __builtin_memcpy ignores known mis-alignment

[Bug target/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 Richard Guenther changed: What|Removed |Added Target||arm-elf Component|c