https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128682

--- Comment #6 from Steve Kargl <kargl at gcc dot gnu.org> ---
(In reply to Harald Anlauf from comment #5)
> (In reply to Steve Kargl from comment #4)
>  
> > The ICE is coming from an assert in gfc_get_expr_charlen() at
> > trans-expr.cc:2295
> > 
> >   gcc_assert (e->expr_type == EXPR_VARIABLE
> >           && e->ts.type == BT_CHARACTER);
> > 
> > The comment above the function is
> > 
> > /* Get the character length of an expression, looking through gfc_refs
> >    if necessary.  */
> > 
> > The untested fix is to do
> > 
> >   gcc_assert (e->ts.type == BT_CHARACTER);
> > 

This leads to another ICE as 'tree length = NULL' is not
updated.

> Looks reasonable.
> 
> This function is very old code, so we need to exercise it a bit.
> Can you do that?

I'll see what I can do.  It's been a long time since I hacked on
gfortran source code.

Reply via email to