[patch] fix wrong gimple code with ptr to forward vla

Andrew Pinski pinskia@physics.uc.edu
Fri Sep 1 15:54:00 GMT 2006


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




More information about the Gcc-patches mailing list