2 ! { dg-options "-fdefault-integer-8" }
3 ! Tests the fix for PR34143, in which the implicit conversion of yy, with
4 ! fdefault-integer-8, would cause a segfault at runtime.
6 ! Contributed by Thomas Koenig <tkoenig@gcc.gnu.org>
8 Program test_constructor
14 integer(4), allocatable
:: a(:, :)
15 type(thytype
), allocatable
:: q(:)
17 integer, allocatable
:: yy(:,:)
18 type (thytype
), allocatable
:: bar(:)
21 if (allocated (x
%a
) .or
. allocated (x
%q
)) STOP 1
24 yy
= reshape ([10,20,30,40],[2,2])
25 bar
= thytype (reshape ([1,2,3,4],[2,2]))
26 ! Check that unallocated allocatables work
28 if (.not
.allocated (y
%a
) .or
. .not
.allocated (y
%q
)) STOP 2
29 end program test_constructor