https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98974
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to avieira from comment #1)
> The testcase above issues a warning, around do j=jts,enddo
>
> To use it as a testcase in my patch I'd like to get rid of it so if someone
> proficient in Fortran knows a way to get rid of it that'd be great!
The following still reproduces the issue for me and is more valid.
module module_foobar
integer,parameter :: fp_kind = selected_real_kind(15)
contains
subroutine foobar( foo, ix ,jx ,kx,iy,ky)
real, dimension( ix, kx, jx ) :: foo
real(fp_kind), dimension( iy, ky, 3 ) :: bar, baz
do k=1,ky
do i=1,iy
if ( baz(i,k,1) > 0. ) then
bar(i,k,1) = 0
endif
foo(i,nk,j) = baz0 * bar(i,k,1)
enddo
enddo
end
end