2 ! { dg-shouldfail "Dim argument incorrect in SUM intrinsic: is 5, should be between 1 and 2" }
6 integer, parameter :: n1
=5, n2
=7
7 integer, dimension(1:n1
,1:n2
) :: arr
8 integer, dimension(1:n1
) :: r2
9 integer, dimension(1:n2
) :: r1
11 character(len
=80) :: c1
, c2
12 character(len
=50) :: fmt
= '(10I5)'
20 write (unit
=c2
, fmt
=fmt
) r1
24 write (unit
=c2
, fmt
=fmt
) r2
31 subroutine print_sum(d
, c
)
32 integer, intent(in
) :: d
33 character(len
=80), intent(out
) :: c
34 write (unit
=c
, fmt
=fmt
) sum(arr
,dim
=d
)