c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr55086_2_tfat.f90
blob8ea268209039058a3c32a7d7ae7c37cf40641ab1
1 ! { dg-do run }
2 ! { dg-options "-ftest-forall-temp" }
4 implicit none
6 character(len=7), pointer :: u
7 character(len=7), pointer :: v
9 character(len=7), target :: a
10 character(len=7), target :: b
12 integer :: j
14 b = "1234567"
15 a = "abcdefg"
17 u => a
18 v => b
20 forall (j = 1:2) a(j:j) = b(j:j)
22 if (a /= "12cdefg") STOP 1
24 forall (j = 2:3) a(j:j) = v(j:j)
25 if (a /= "123defg") STOP 2
27 forall (j = 3:4) u(j:j) = b(j:j)
28 if (a /= "1234efg") STOP 3
30 forall (j = 4:5) u(j:j) = v(j:j)
31 if (a /= "12345fg") STOP 4
33 end