PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_27.f90
blobb677438d688f6a4951d009738099c8270fa7a11d
1 ! { dg-do run }
3 ! Test the fix for PR80120
5 ! Contributed by Marco Restelli <mrestelli@gmail.com>
7 program p
8 implicit none
10 type :: t
11 character(len=25) :: text(2)
12 end type t
13 type(t) :: x
15 x%text(1) = "ABC"
16 x%text(2) = "defgh"
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
23 end program p