This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[stack] [PATCH]: PR c/34921 Misalign stack variable referenced by nested function
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Richard Guenther" <richard dot guenther at gmail dot com>
- Cc: "Ye, Joey" <joey dot ye at intel dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 Feb 2008 07:12:22 -0800
- Subject: [stack] [PATCH]: PR c/34921 Misalign stack variable referenced by nested function
- References: <BB577BF501703042AD7E08EADD8E514F4BDCF4@pdsmsx415.ccr.corp.intel.com> <20080205144702.GA27126@lucon.org> <84fc9c000802050715n511a545fqfcd8143464beda03@mail.gmail.com>
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.