Hi all,
The attached patch takes care of problems with my previous patch already
committed. That patch broke ABI as well. With the example of
namelist_14.f90
in the testsuite I was able to realize the real problem.
This patch reverts many of the changes in the previous and moves
delim_status,
decimal_status, and pad_status into the gfc_unit structure. This is safe
because this entire structure is allocated and initialized by the run
time library.
I also eliminated the IOPARM_dt_f2003 flag bit. This is not needed
because the
F2003 features are already flagged individually by bits in
st_parameter_common.
The 4.3 compiler never sets those bits, so the 4.4 run time will never
access
those locations when called by a 4.3 executable and so will not
overwrite areas
possibly used by 4.3.
Also, with Thomas example:
$ 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[jerry@lenova pr37498]$ cat sub.f90
subroutine sub(r)
write (20,fmt='(G12.5)') r
end
$ ./a.out
$ cat fort.20
1,3000
20,000
1,6000
The "feature" is now correct. The "unit" remembers its status. The patch
does
not revert all of the previous patch. Regression tested on x86-64.
OK to commit?