This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20618] Variable format expressions not supported
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2005 14:29:36 -0000
- Subject: [Bug fortran/20618] Variable format expressions not supported
- References: <20050324123743.20618.Thomas.Koenig@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Thomas dot Koenig at online dot de 2005-03-24 14:29 -------
Actually, implementing this would be a bit harder
than I thought.
It seems that the variable expression is evaluated
at runtime, so you can do things like
$ cat v-fmt2.f
program main
character*1 c
10 continue
read(fmt=9000,unit=*,end=20) j,c
print *,c
goto 10
20 continue
9000 format(i1,t<j>,a1)
end
$ ifort -traceback v-fmt2.f
$ ./a.out
1abcd
1
2abcd
a
3abcd
b
Still doable with non-advancing I/O and internal writes, but
tricky.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20618