[stack] [PATCH]: PR c/34921 Misalign stack variable referenced by nested function

H.J. Lu hjl.tools@gmail.com
Wed Feb 6 15:12:00 GMT 2008


On Feb 5, 2008 7:15 AM, Richard Guenther <richard.guenther@gmail.com> wrote:
> On Feb 5, 2008 3:47 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > On Wed, Jan 23, 2008 at 03:49:20PM +0800, Joey Ye wrote:
> > > Alignment of structure type for nested function is not copied from it's
> > > field.
> > >
> > > gcc/
> > > 2008-01-22  Joey Ye  <joey.ye@intel.com>
> > >
> > >       * tree-nested.c (insert_field_into_struct): Set type alignment
> > >       to field alignment if the former is less than the latter.
> > >
> > > gcc/testsuite/
> > > 2008-01-22  Joey Ye  <joey.ye@intel.com>
> > >
> > >       * gcc.dg/nested-func-align.c: New test case.
> > >
> >
> > There are 2 issues with testcases:
> >
> > 1. Your email broke the long line and the patch won't apply
> > cleanly.
> > 2. You should use ptrdiff_t instead of long for address. Long on
> > some 64bit targets is 32bit.
> > 3. Put it in gcc.c-torture/execute will run with different compiler
> > flags.
> >
> > This is the patch I am testing. OK for 4.4?
>
> Ok for 4.4.
>

I checked it into stack branch.

H.J.



More information about the Gcc-patches mailing list