* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_22.f90
blob1558992004d1773eee4b6fdc083f66c015130723
1 ! { dg-do run }
2 program foo
4 implicit none
6 character(len=4) :: s
7 character(len=10) :: a
9 ! This works.
10 s = 'abc'
11 associate(t => s)
12 if (trim(t) /= 'abc') call abort
13 end associate
15 ! This failed.
16 associate(u => 'abc')
17 if (trim(u) /= 'abc') call abort
18 end associate
20 ! This failed.
21 a = s // 'abc'
22 associate(v => s // 'abc')
23 if (trim(v) /= trim(a)) call abort
24 end associate
26 ! This failed.
27 a = trim(s) // 'abc'
28 associate(w => trim(s) // 'abc')
29 if (trim(w) /= trim(a)) call abort
30 end associate
32 ! This failed.
33 associate(x => trim('abc'))
34 if (trim(x) /= 'abc') call abort
35 end associate
37 end program foo