This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]