This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/77560] Redefinition of lower bound in explicit-shape dummy argument


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]