This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/42448] [4.3/4.4/4.5 Regression] Wrong code with _Complex char in structure
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2009 19:36:39 -0000
- Subject: [Bug target/42448] [4.3/4.4/4.5 Regression] Wrong code with _Complex char in structure
- References: <bug-42448-1649@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from ubizjak at gmail dot com 2009-12-21 19:36 -------
This happens on !TARGET_BWX targets. Unaligned HImode access can cross widened
SImode boundaries. Following patch triggers on this invalid condition in
get_aligned_mem:
Index: alpha.c
===================================================================
--- alpha.c (revision 155372)
+++ alpha.c (working copy)
@@ -1475,6 +1475,10 @@ get_aligned_mem (rtx ref, rtx *paligned_
else
offset = disp & 3;
+ /* The location should not cross aligned word boundary. */
+ gcc_assert (offset + GET_MODE_SIZE (GET_MODE (ref))
+ <= GET_MODE_SIZE (SImode));
+
/* Access the entire aligned word. */
*paligned_mem = widen_memory_access (ref, SImode, -offset);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42448