This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR middle-end/45678: [4.4/4.5/4.6 Regression] crash on vector code with -m32 -msse
On Mon, Sep 20, 2010 at 10:12:58AM -0700, H.J. Lu wrote:
> You should remove
>
> update_stack_alignment (align);
>
> a few line down since it will never increase stack alignment.
Here is an updated patch, bootstrapped/regtested again on x86_64-linux and
i686-linux. Ok?
2010-09-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/45678
* cfgexpand.c (expand_one_stack_var_at): Use
crtl->max_used_stack_slot_alignment as max_align, instead
of maximum of that and PREFERRED_STACK_BOUNDARY.
Don't call update_stack_alignment.
--- gcc/cfgexpand.c.jj 2010-09-20 18:44:57.928431137 +0200
+++ gcc/cfgexpand.c 2010-09-20 20:03:32.706364386 +0200
@@ -738,12 +738,10 @@ expand_one_stack_var_at (tree decl, HOST
offset -= frame_phase;
align = offset & -offset;
align *= BITS_PER_UNIT;
- max_align = MAX (crtl->max_used_stack_slot_alignment,
- PREFERRED_STACK_BOUNDARY);
+ max_align = crtl->max_used_stack_slot_alignment;
if (align == 0 || align > max_align)
align = max_align;
- update_stack_alignment (align);
DECL_ALIGN (decl) = align;
DECL_USER_ALIGN (decl) = 0;
}
Jakub