]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/16038 (Bug in handling packed structures on MIPS)
authorIan Lance Taylor <ian@wasabisystems.com>
Fri, 18 Jun 2004 17:08:48 +0000 (17:08 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 18 Jun 2004 17:08:48 +0000 (17:08 +0000)
PR middle-end/16038
Backport from mainline:
Fri Apr  4 17:43:52 2003  Olivier Hainque <hainque@act-europe.fr>

* emit-rtl.c (get_mem_attrs): Adjust alignment tests determining
use of default attributes to agree MEM_ALIGN macro.

From-SVN: r83356

gcc/ChangeLog
gcc/emit-rtl.c

index 0254af9c82bb35a5cf2475ce71eebd63c9d1b6ed..2c801706698f249abb44a1a2bf5afc4ffc0d1bcb 100644 (file)
@@ -1,3 +1,12 @@
+2004-06-17  Ian Lance Taylor  <ian@wasabisystems.com>
+
+       PR middle-end/16038
+       Backport from mainline:
+       Fri Apr  4 17:43:52 2003  Olivier Hainque <hainque@act-europe.fr>
+
+       * emit-rtl.c (get_mem_attrs): Adjust alignment tests determining
+       use of default attributes to agree MEM_ALIGN macro.
+
 2004-05-31  Release Manager
 
        * GCC 3.3.4 Released.
index ac69c0bf15c97e014547e92035ad2f68057dbc0e..74bb7c2b438f81c08f47b830d952add4991f1acc 100644 (file)
@@ -297,13 +297,14 @@ get_mem_attrs (alias, expr, offset, size, align, mode)
   mem_attrs attrs;
   void **slot;
 
-  /* If everything is the default, we can just return zero.  */
+  /* If everything is the default, we can just return zero.
+     This must match what the corresponding MEM_* macros return when the
+     field is not present.  */
   if (alias == 0 && expr == 0 && offset == 0
       && (size == 0
          || (mode != BLKmode && GET_MODE_SIZE (mode) == INTVAL (size)))
-      && (align == BITS_PER_UNIT
-         || (STRICT_ALIGNMENT
-             && mode != BLKmode && align == GET_MODE_ALIGNMENT (mode))))
+      && (STRICT_ALIGNMENT && mode != BLKmode
+         ? align == GET_MODE_ALIGNMENT (mode) : align == BITS_PER_UNIT))
     return 0;
 
   attrs.alias = alias;