c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr55086_2.f90
blob904dc1a9a3e2c5253c3938890cb9acee39d82590
1 ! { dg-do run }
3 implicit none
5 character(len=7), pointer :: u
6 character(len=7), pointer :: v
8 character(len=7), target :: a
9 character(len=7), target :: b
11 integer :: j
13 b = "1234567"
14 a = "abcdefg"
16 u => a
17 v => b
19 forall (j = 1:2) a(j:j) = b(j:j)
21 if (a /= "12cdefg") STOP 1
23 forall (j = 2:3) a(j:j) = v(j:j)
24 if (a /= "123defg") STOP 2
26 forall (j = 3:4) u(j:j) = b(j:j)
27 if (a /= "1234efg") STOP 3
29 forall (j = 4:5) u(j:j) = v(j:j)
30 if (a /= "12345fg") STOP 4
32 end