Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288]
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_36.f90
blob1506dc917bad4e5ab27b18510bc042f7fce39120
1 ! { dg-do run }
3 ! Test the fix for PR83344.
5 ! Contributed by Janne Blomqvist <jb@gcc.gnu.org>
6 ! and Steve Kargl <kargl@gcc.gnu.org>
8 program foo
9 implicit none
10 character(len=1) a
11 character(len=2) b
12 character(len=3) c
13 a = 'a'
14 call bah(a, len (a))
15 b = 'bb'
16 call bah(b, len (b))
17 c = 'ccc'
18 call bah(c, len (c))
19 contains
20 subroutine bah(x, clen)
21 implicit none
22 integer :: clen
23 character(len=*), intent(in) :: x
24 associate(y => x)
25 if (len(y) .ne. clen) stop 1
26 if (y .ne. x) stop 2
27 end associate
28 end subroutine bah
29 end program foo