aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-02-16 13:01:02 -0800
committerJim Wilson <wilson@gcc.gnu.org>1994-02-16 13:01:02 -0800
commit8dc2fbcff405022e400639276f042d05be6a4ab1 (patch)
tree281c88b154d25a1b48d6409b5e676fb83e9bb7c2 /gcc
parent6551fa4d72e13024c63ba3cfa615fcdb7a0da0a3 (diff)
downloadgcc-8dc2fbcff405022e400639276f042d05be6a4ab1.zip
gcc-8dc2fbcff405022e400639276f042d05be6a4ab1.tar.gz
gcc-8dc2fbcff405022e400639276f042d05be6a4ab1.tar.bz2
(get_pointer_alignment): ALIGN is alignment of innermost
object, not the MAX of alignment of all objects. From-SVN: r6579
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index a336dd7..8fba510 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6470,8 +6470,7 @@ get_pointer_alignment (exp, max_align)
if (TREE_CODE (TREE_TYPE (exp)) != POINTER_TYPE)
return align;
inner = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp)));
- inner = MIN (inner, max_align);
- align = MAX (align, inner);
+ align = MIN (inner, max_align);
break;
case PLUS_EXPR:
@@ -6493,9 +6492,9 @@ get_pointer_alignment (exp, max_align)
/* See what we are pointing at and look at its alignment. */
exp = TREE_OPERAND (exp, 0);
if (TREE_CODE (exp) == FUNCTION_DECL)
- align = MAX (align, FUNCTION_BOUNDARY);
+ align = FUNCTION_BOUNDARY;
else if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd')
- align = MAX (align, DECL_ALIGN (exp));
+ align = DECL_ALIGN (exp);
#ifdef CONSTANT_ALIGNMENT
else if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'c')
align = CONSTANT_ALIGNMENT (exp, align);