aarch64: Add missing ACLE macro for NEON-SVE Bridge
[official-gcc.git] / gcc / testsuite / gfortran.dg / der_array_1.f90
blob703b151a8b6827b8c1a0c7a6734a2c84ad4f09b4
1 ! { dg-do run }
2 ! Test derived type constructors for derived types containing arrays.
3 ! PR16919
4 program der_array_1
5 implicit none
6 integer n
7 integer m
8 ! The 4 components here test known shape array, unknown shape array,
9 ! multi-dimensional arrays and array pointers
10 type t
11 integer :: a(2)
12 integer :: b(2)
13 integer, dimension(2, 3) :: c
14 integer, pointer, dimension(:) :: p
15 end type
16 type(t) :: v
17 integer, dimension(2, 3) :: d
18 integer, dimension(:), pointer :: e
19 integer, dimension(2) :: f
21 m = 2
22 f = (/3, 4/)
23 d = reshape ((/5, 6, 7, 8, 9, 10/), (/2, 3/));
24 allocate (e(2))
26 v = t((/1, 2/), reshape (f, (/m/)), d, e);
27 if (any (v%a .ne. (/1, 2/)) .or. any (v%b .ne. (/3, 4/)) &
28 .or. any (v%c .ne. d) .or. .not. associated (v%p, e)) &
29 STOP 1
31 deallocate(e)
32 end program