2 ! Checks the fixes for PR34681 and PR34704, in which various mixtures
3 ! of default initializer and allocatable array were not being handled
4 ! correctly for derived types with allocatable components.
6 ! Contributed by Paolo Giannozzi <p.giannozzi@fisica.uniud.it>
9 integer :: c1
, c2
, c3
, c4
, c5
11 call mah (0, c1
) ! These calls deal with PR34681
15 if (c1
/= c2
) call abort
16 if (c1
/= c3
) call abort
18 call mah0 (c4
) ! These calls deal with PR34704
21 if (c4
/= c5
) call abort
27 integer, intent(in
) :: i
28 integer, intent(OUT
) :: c
31 real(8), allocatable
:: a(:)
32 complex(8), allocatable
:: b(:)
34 type(mix_type
), allocatable
, save :: t(:)
46 c
= sum( t(1)%a(:) ) + sum( t(1)%b(:) )
56 integer, intent(OUT
) :: c
58 real(8), allocatable
:: a(:)
72 integer, intent(OUT
) :: c
74 real(8), allocatable
:: a(:)
77 type(mix_type
), save :: t