1! { dg-do run } 2! 3! Test the fix for PR83344. 4! 5! Contributed by Janne Blomqvist <jb@gcc.gnu.org> 6! and Steve Kargl <kargl@gcc.gnu.org> 7! 8program 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 29end program foo 30