1! { dg-do run }
2!
3! Test the fix for PR84115 comment #1.
4!
5! Contributed by G Steinmetz  <gscfq@t-online.de>
6!
7  character(:), allocatable :: dum
8  dum = "s1"
9  call s1 (dum)
10  dum = "s2"
11  call s2 (dum)
12  dum = "s3"
13  call s3 (dum)
14contains
15  subroutine s1(x)
16    character(:), allocatable :: x
17    associate (y => x//x)
18      if (y .ne. x//x) stop 1
19    end associate
20  end
21
22  subroutine s2(x)
23    character(:), allocatable :: x
24    associate (y => [x])
25      if (any(y .ne. [x])) stop 2
26    end associate
27  end
28
29  subroutine s3(x)
30    character(:), allocatable :: x
31    associate (y => [x,x])
32      if (any(y .ne. [x,x])) stop 3
33    end associate
34  end
35end
36