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/42448] [4.3/4.4/4.5 Regression] Wrong code with _Complex char in structure



------- 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


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