From: Tom de Vries Date: Sun, 31 Jul 2011 10:05:07 +0000 (+0000) Subject: re PR middle-end/43513 (The stack pointer is adjusted twice) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f047e5183b142d9f0c64b17d8e51f328fe02d2f1;p=gcc.git 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 --- 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) {