Debian Codegraph @

gcc/testsuite/gfortran.dg/associate_27.f90

raw
1 ! { dg-do run }
2 !
3 ! Test the fix for PR80120
4 !
5 ! Contributed by Marco Restelli <[email protected]>
6 !
7 program p
8 implicit none
9
10 type :: t
11 character(len=25) :: text(2)
12 end type t
13 type(t) :: x
14
15 x%text(1) = "ABC"
16 x%text(2) = "defgh"
17
18 associate( c => x%text )
19 if (c(1)(:maxval(len_trim(c))) .ne. trim (x%text(1))) STOP 1
20 if (c(2)(:maxval(len_trim(c))) .ne. trim (x%text(2))) STOP 2
21 end associate
22
23 end program p