lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_with_mold_4.f90
blobd545fe1249f1ba7f45630f02a1d126df87eaba3e
1 program A_M
2 implicit none
3 real, parameter :: C(5:10) = 5.0
4 real, dimension (:), allocatable :: A, B
5 allocate (A(6))
6 call Init (A)
7 contains
8 subroutine Init ( A )
9 real, dimension ( -1 : ), intent ( in ) :: A
10 integer, dimension ( 1 ) :: lb_B
12 allocate (B, mold = A)
13 if (any (lbound (B) /= lbound (A))) stop 1
14 if (any (ubound (B) /= ubound (A))) stop 2
15 if (any (shape (B) /= shape (A))) stop 3
16 if (size (B) /= size (A)) stop 4
17 deallocate (B)
18 allocate (B, mold = C)
19 if (any (lbound (B) /= lbound (C))) stop 5
20 if (any (ubound (B) /= ubound (C))) stop 6
21 if (any (shape (B) /= shape (C))) stop 7
22 if (size (B) /= size (C)) stop 8
23 end
24 end