* cfghooks.c (verify_flow_info): Disable check that all probabilities
[official-gcc.git] / gcc / testsuite / gfortran.dg / der_array_1.f90
blob00dc7a5c2b3354a158f42f4b85e086d483ccae7d
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 call abort ()
31 deallocate(e)
32 end program