This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] was - Re: Possible bug in gfortran: array sections in actual arguments
- From: Mikael Morin <mikael dot morin at tele2 dot fr>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: Tobias Burnus <burnus at net-b dot de>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Daniel Franke <franke dot daniel at gmail dot com>, fortran at gcc dot gnu dot org, Clive Page <clivegpage at googlemail dot com>
- Date: Wed, 28 Jan 2009 21:07:57 +0100
- Subject: Re: [Patch, fortran] was - Re: Possible bug in gfortran: array sections in actual arguments
- References: <339c37f20901281056q41f70acaoc19c92c04159039d@mail.gmail.com>
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