2 ! { dg-options "-Warray-temporaries" }
4 ! This used to cause wrong packing because a(1:n,1:n) was
5 ! assumed to be a full array.
10 integer, dimension(n
,n
), intent(inout
) :: a
13 call baz(a(1:n
,1:n
),n
) ! { dg-warning "array temporary" }
17 integer, dimension(n
,n
), intent(inout
) :: a
20 call baz(a(1:n
,1:n
),n
) ! { dg-warning "array temporary" }
24 integer, dimension(n
,n
), intent(inout
) :: a
27 call baz(a(1:m
,1:m
),m
) ! { dg-warning "array temporary" }
31 integer, dimension(n
,n
), intent(inout
) :: a
32 integer, intent(in
) :: n
37 integer, dimension(n
,n
), intent(inout
) :: a
38 integer, intent(in
) :: n
42 subroutine decrement(n
)
43 integer, intent(inout
) :: n
45 end subroutine decrement
52 integer, dimension(5,5) :: a
, b
61 if (any(a
/= b
)) call abort
66 if (any(a
/= b
)) call abort
71 if (any(a
/= b
)) call abort
76 if (any(a
/= 1)) call abort