g77: select case
ctdt
endeavor@t-online.de
Sun Jan 27 15:29:00 GMT 2002
Hello,
I have used g77 extensively. I know it is not f95 or even f90 (even with the
-ff90 option).
Still, I find the problem, I just discovered, disquieting.
I have previously converted some now obsolete computed goto's to select case.
It seemed to work ok with g77.
However, now I found a very simple case, that gives very strange results, but
works ok , if I add print statement to the cases.
g77 -ff90 seltst.f
/usr/lib/gcc-lib/i486-suse-linux/2.95.3/libg2c.a(open.o): In function
`f_open':
open.o(.text+0x4da): the use of `tempnam' is dangerous, better use `mkstemp'
/tmp/ccm2Rp5c.o: In function `MAIN__':
/tmp/ccm2Rp5c.o(.text+0x6b): undefined reference to `L4'
/tmp/ccm2Rp5c.o(.text+0x73): undefined reference to `L4'
collect2: ld returned 1 exit status
The file compiles seltst.f without problems with the -O -W -Wall options you
suggest, but the result is nonsense.
With trivial print statements added, sela.f, the result is ok.
I feel that either "select case" should work properly, or it should remain an
unrecognized feature in g77. The problem is not restricted to character
select, as the g77 manual states.
An extension to Fortran 95 (2000), of course, would fill a real need.
Sincerely,
Christian T. Dum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20020127/d15d1c24/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seltst.f
Type: application/octet-stream
Size: 368 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20020127/d15d1c24/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sela.f
Type: application/octet-stream
Size: 433 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20020127/d15d1c24/attachment-0001.obj>
More information about the Gcc-bugs
mailing list