[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr55086_2_tfat.f90
blob7d09ed1d8c1a06336004463f531e7b2088904217
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") call abort
24 forall (j = 2:3) a(j:j) = v(j:j)
25 if (a /= "123defg") call abort
27 forall (j = 3:4) u(j:j) = b(j:j)
28 if (a /= "1234efg") call abort
30 forall (j = 4:5) u(j:j) = v(j:j)
31 if (a /= "12345fg") call abort
33 end