2 ! Test the patch for PR30084 in which the reference to SIZE
3 ! in function diag caused a segfault in module.c.
5 ! Contributed by Troban Trumsko <trumsko@yahoo.com>
6 ! and reduced by Steve Kargl <kargl@gcc.gnu.org>
8 module tao_random_numbers
9 integer, dimension(10) :: s_buffer
10 integer :: s_last
= size (s_buffer
)
11 end module tao_random_numbers
15 function diag (a
) result (d
)
16 real, dimension(:,:), intent(in
) :: a
17 real, dimension(min(size(a
,dim
=1),size(a
,dim
=2))) :: d
19 do i
= 1, min(size(a
, dim
= 1), size(a
, dim
= 2))
26 use tao_random_numbers
31 real :: x(2, 2) = reshape ([1.,2.,3.,4.], [2,2])