[patch, fortran] [4.4 Regression] PR37498 Incorrect array value returned - 4.3 ABI Broken - FINAL

Thomas Koenig tkoenig@netcologne.de
Sun Sep 21 22:30:00 GMT 2008


On Sun, 2008-09-21 at 12:48 -0700, Jerry DeLisle wrote:
> Hi All,
> 
> The attached patch has been cleaned up from the previous and regression tested 
> on x86-64. Regression testing on ppc64-linux is in progress and looks good so far.
> 
> I added checks to avoid accessing the F2003 I/O parameters by a 4.3 compiled 
> program.
> 
> I have not a way to cross test 4.3 compiled testsuite with 4.4 libgfortran. 
> Suggestions would be appreciated.
> 
> OK to commit to trunk?

This is OK.  Thanks a lot for fixing this major regression!

One side remark:  With your patch, we get

$ cat main.f90
program main
  open(20,form="formatted",decimal="comma")
  write(20,fmt="(G12.5)") 1.3
  call sub(20.)
  write(20,fmt="(G12.5)") 1.6
end program main
$ cat sub.f90
subroutine sub(r)
  write (20,fmt='(G12.5)')  r
end
tkoenig@gcc16:~/Krempel/ABI/A$ make
gfortran-4.4 -c main.f90
gfortran-4.3 -c sub.f90
gfortran-4.4 -o prog main.o sub.o
./prog
cat fort.20
  1,3000
  20.000
  1,6000

Upon reflection, I have concluded that this is a feature, not a bug :-)

	Thomas



More information about the Fortran mailing list