https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77560
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2016-09-11 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- I think the code is invalid: "from = from + 1" tries to write on the constant 1. The following test works subroutine foo(a,from,to) integer :: from, to real, dimension(from:to) :: a from = from + 1 print *,a end subroutine foo program main integer :: ione = 1 real, dimension(3) :: a a = reshape([(i,i=1,3)],shape(a)) print *,a call foo(a,ione,3) end program main