From f047e5183b142d9f0c64b17d8e51f328fe02d2f1 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sun, 31 Jul 2011 10:05:07 +0000 Subject: [PATCH] re PR middle-end/43513 (The stack pointer is adjusted twice) 2011-07-31 Tom de Vries PR middle-end/43513 * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Use max of get_object_alignment and TYPE_ALIGN. From-SVN: r176969 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-loop-ivopts.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99968b32857..5e64d3e21d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-07-31 Tom de Vries + + PR middle-end/43513 + * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Use max of + get_object_alignment and TYPE_ALIGN. + 2011-07-30 Tom de Vries PR middle-end/43513 diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 4d4b67af3f9..cc9b2dd8945 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1635,7 +1635,8 @@ may_be_unaligned_p (tree ref, tree step) base = get_inner_reference (ref, &bitsize, &bitpos, &toffset, &mode, &unsignedp, &volatilep, true); base_type = TREE_TYPE (base); - base_align = TYPE_ALIGN (base_type); + base_align = get_object_alignment (base, BIGGEST_ALIGNMENT); + base_align = MAX (base_align, TYPE_ALIGN (base_type)); if (mode != BLKmode) { -- 2.30.2