2 ! { dg-options "-Warray-temporaries" }
11 subroutine foo(a
,b
,c
,i
)
12 real, dimension(10) :: a
,b
14 integer, dimension(10) :: i
15 a(i(1):i(2)) = a(i(1):i(2)) + b(i(1):i(2))
16 a(i(1):i(2)) = a(i(3):i(5)) ! { dg-warning "Creating array temporary" }
17 a(c
%i
:c
%j
) = a(c
%i
:c
%j
) + b(c
%k
:c
%m
)
18 a(c
%k
:c
%m
) = a(c
%i
:c
%j
) + b(c
%k
:c
%m
) ! { dg-warning "Creating array temporary" }