Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/associate_36.f90 @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
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 ! | |
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 |