Debian Codegraph @

gcc/testsuite/gfortran.dg/associate_34.f90

raw
1 ! { dg-do run }
2 !
3 ! Test the fix for PR84115.
4 !
5 ! Contributed by G Steinmetz <[email protected]>
6 !
7 character(:), allocatable :: chr
8 allocate (chr, source = "abc")
9 call s(chr, "abc")
10 chr = "mary had a little lamb"
11 call s(chr, "mary had a little lamb")
12 deallocate (chr)
13 contains
14 subroutine s(x, carg)
15 character(:), allocatable :: x
16 character(*) :: carg
17 associate (y => x)
18 if (y .ne. carg) STOP 1
19 end associate
20 end
21 end