On Fri, Jun 28, 2024 at 10:00:53PM +0200, Harald Anlauf wrote:
> 
> the attached patch fixes an ICE occuring for ALLOCATE with SOURCE
> (or MOLD) of deferred character length in the scalar case, which
> looked obscure because the ICE disappears at -O1 and higher.
> 
> The dump tree suggests that it is a wrong decl for the temporary
> source that was e.g.
> 
>         character(kind=1) source.2[1:];
> 
> whereas I had expected
> 
>         character(kind=1)[1:] * source.2;
> 
> and which we now get after the patch.  Or am I missing something?
> 
> Regtested on x86_64-pc-linux-gnu.  OK for mainline?

I don't think you're missing anything.  We've a number of bugs
were one needs to distinguish between various declarations:

character(len=2), allocatable :: a
character(len=:), allocatable :: a(2)
character(len=:), allocatable :: a(:)

I can certain imagine you've fixed another (corner) case that
was originally missed.

OK to commit.  Thanks for the patch.

-- 
Steve

Reply via email to