https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65819

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #3 from kargl at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #2)
> The LHS and the arrays on the RHS cannot possibly overlap,
> because of the difference in the first index.
> 
> ig25@linux-fd1f:~/Krempel/Dep-f> cat foo.f90
> program main
>   implicit none
>   real, dimension(3,3,3) :: f
>   integer :: three
>   call random_number(f)
>   three = 3
>   f(1, 1:three, :) = matmul(f(2,1:3,2:3), f(3,2:3,:))
>   print *,f
> end program main
> ig25@linux-fd1f:~/Krempel/Dep-f> gfortran -O -Warray-temporaries foo.f90
> foo.f90:7:21:
> 
>    f(1, 1:three, :) = matmul(f(2,1:3,2:3), f(3,2:3,:))
>                      1
> Warning: Creating array temporary at (1) [-Warray-temporaries]

Is this PR still a problem?  I get no warnings with 

% gfcx -o z -Wall -Wsurprising -Wextra a.f90

Reply via email to