Hi Steve,

Being an allocatable component, this code appears on entry into scope:

  my_core.msg = 0B;
  my_core._msg_length = 0;
  {

Thus, according to the standard, my_core%msg is defined.

If you follow the backtrace from the ICE, you will see that something
like the patch is required. It is important that the dependency is
detected for this assignment even though no array references are
involved. There is certainly the need for a temporary, which the patch
generates.

Cheers

Paul

On Wed, 11 Sep 2019 at 06:50, Steve Kargl
<s...@troutmask.apl.washington.edu> wrote:
>
> On Wed, Sep 11, 2019 at 06:44:50AM +0100, Paul Richard Thomas wrote:
> > ===================================================================
> > *** gcc/testsuite/gfortran.dg/dependency_55.f90       (nonexistent)
> > --- gcc/testsuite/gfortran.dg/dependency_55.f90       (working copy)
> > ***************
> > *** 0 ****
> > --- 1,17 ----
> > + ! { dg-do run }
> > + !
> > + ! Test the fix for PR91717 in which the concatenation operation ICEd.
> > + !
> > + ! Contributed by Damian Rouson  <dam...@sourceryinstitute.org>
> > + !
> > +   type core
> > +     character (len=:), allocatable :: msg
> > +   end type
> > +
> > +   type(core) :: my_core
> > +
> > +   my_core%msg = my_core%msg//"my message is: "
>
> my_core%msg is undefined on the RHS.  This is invalid
> Fortran.  Not sure whether your patch is correct or not.
>
> --
> Steve



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

Reply via email to