This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77560] Redefinition of lower bound in explicit-shape dummy argument
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Sep 2016 13:33:28 +0000
- Subject: [Bug fortran/77560] Redefinition of lower bound in explicit-shape dummy argument
- Auto-submitted: auto-generated
- References: <bug-77560-4@http.gcc.gnu.org/bugzilla/>
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