Hi, On Thu, 14 Apr 2011, H.J. Lu wrote:
> >> > + if (align > DECL_ALIGN (decl)) > >> > + DECL_ALIGN (decl) = align; > >> > >> Shouldn't this unconditionally set DECL_ALIGN in case > >> LOCAL_DECL_ALINGMENT returns something smaller? > > > > Decreasing alignment of DECLs points to a problem elsewhere, so perhaps an > > assert that this doesn't happen is better. Decreasing is a problem > > because it's not conservative: there might have been code generated > > already assuming the once larger alignment that then possibly breaks if it > > turns out the alignment is actually smaller. > > ia32 may decrease local variable alignment: > > /* Don't do dynamic stack realignment for long long objects with > -mpreferred-stack-boundary=2. */ > if (!TARGET_64BIT > && align == 64 > && ix86_preferred_stack_boundary < 64 > && (mode == DImode || (type && TYPE_MODE (type) == DImode)) > && (!type || !TYPE_USER_ALIGN (type)) > && (!decl || !DECL_USER_ALIGN (decl))) > align = 32; But it hopefully does so before gimplification? I.e. before real code is generated that could possibly make use of the large alignment? Ciao, Michael.