This is the mail archive of the gcc-patches@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]

Re: [Patch, fortran] was - Re: Possible bug in gfortran: array sections in actual arguments


Hi Paul,

thanks for looking into this.
There is still something missing for the case lbound == 1.
Consider the following:

      implicit none
      call test (1,  3)
      call test (2,  3)
      call test (2, -1)
      call test (1, -1)
      contains
      subroutine test (a, b)
      integer :: a, b
      integer :: c(a:b)
      print *, ubound(c,1)
      end subroutine test
      end

The patched output is:
           3
           3
           0
          -1

vs unpatched (which is what I expect):
           3
           3
           0
           0

I must confess I can't see any way to fix this bug properly :-(.

Cheers
Mikael


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