This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] fix wrong gimple code with ptr to forward vla
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Olivier Hainque <hainque at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 01 Sep 2006 08:54:02 -0700
- Subject: Re: [patch] fix wrong gimple code with ptr to forward vla
- References: <20060901093351.GA10557@cardhu.act-europe.fr>
On Fri, 2006-09-01 at 11:33 +0200, Olivier Hainque wrote:
> Hello,
>
> The attached patch fixes a problem whereby wrong gimple code is
> emitted for a construct involving a pointer to a forward type which
> later completion involves a variable length array.
>
> We first saw it on a Ada testcase then found a C counterpart
> exhibiting the same behavior. Compiling the code below ...
Here is a shorter testcase:
void foo ()
{
struct sequence * ptr;
int size = 2;
struct sequence { int values [size]; }seq;
seq.values [0] = 1;
}
-- Pinski