2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_allocate_21.f90
bloba8ed291f8dfaf0fbe5b787767562dacb39c08249
1 ! { dg-do run }
3 ! Testcase for pr57117
5 implicit none
7 type :: ti
8 integer :: i
9 end type
11 class(ti), allocatable :: x(:,:), z(:)
12 integer :: i
14 allocate(x(3,3))
15 x%i = reshape([( i, i = 1, 9 )], [3, 3])
16 allocate(z(9), source=reshape(x, (/ 9 /)))
18 if (any( z%i /= [( i, i = 1, 9 )])) call abort()
19 deallocate (x, z)
20 end