From 1e61710e278a4ff09d2bd261f5bb9ef693061924 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 18 Jun 2004 17:08:48 +0000 Subject: [PATCH] re PR middle-end/16038 (Bug in handling packed structures on MIPS) PR middle-end/16038 Backport from mainline: Fri Apr 4 17:43:52 2003 Olivier Hainque * emit-rtl.c (get_mem_attrs): Adjust alignment tests determining use of default attributes to agree MEM_ALIGN macro. From-SVN: r83356 --- gcc/ChangeLog | 9 +++++++++ gcc/emit-rtl.c | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0254af9c82bb..2c801706698f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2004-06-17 Ian Lance Taylor + + PR middle-end/16038 + Backport from mainline: + Fri Apr 4 17:43:52 2003 Olivier Hainque + + * 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. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index ac69c0bf15c9..74bb7c2b438f 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -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; -- 2.47.2