This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, gfortran] Fix initialization of arrays of strings
On Sun, Jul 10, 2005 at 07:44:27PM -0700, Steve Kargl wrote:
> On Sun, Jul 10, 2005 at 07:04:09PM -0700, Steve Kargl wrote:
> > --- 756,771 ----
> > gfc_set_constant_character_len (len, init);
> > else if (init->expr_type == EXPR_ARRAY)
> > {
> > ! if (init->ts.cl == NULL)
> > ! {
> > ! init->ts.cl = gfc_get_charlen ();
> > ! init->ts.cl->length = gfc_copy_expr (sym->ts.cl->length);
>
> In looking at the patch, I just realized the above line isn't
> needed. I have new patch without this line.
>
> > ! }
> > ! else if (init->ts.cl->length != NULL)
> > ! gfc_free_expr (init->ts.cl->length);
> > !
> > init->ts.cl->length = gfc_copy_expr (sym->ts.cl->length);
> > +
> > for (p = init->value.constructor; p; p = p->next)
> > gfc_set_constant_character_len (len, p->expr);
> > }
>
>
> Also, I hve bubblestrap and regtested on i386-*-freebsd.
BTW, this patch allows me to compile Michel Olagnon f90ppr
utility and I'm one step closer to compiling FMLIB.
--
Steve