bug?
root
peres@evunix.uevora.pt
Wed Nov 1 13:07:00 GMT 2000
Dear Sir/Madam,
This very simple FORTRAN codes does not compile.
What is the problem? The error message is below
CODE:
program teste
implicit none
real*8 q
parameter (q=4.d0*datan(1.d0))
print*, q
end
COMPILER ERROR MESSAGE:
[root@borboleta nuno]# g77 teste.f
teste.f: In program `teste':
teste.f:4:
parameter (q=4.d0*datan(1.d0))
^
Invalid declaration of or reference to symbol `datan' at (^) [initially
seen at (^)]
[root@borboleta nuno]#
------------------------------------------------------------------
If I write the code has follows it compiles, but I still get a strange
message. (see below)
CODE:
program teste
implicit none
real*8 q
q=4.d0*datan(1.d0)
print*, q
end
COMPILER MESSAGE:
root@borboleta nuno]# g77 teste.f
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libg2c.a(open.o): In function
`f_open':
open.o(.text+0x4e6): the use of `tempnam' is dangerous, better use
`mkstemp'
--------------------------------------------------------------------
If I use the fort77 compiler I have no problem at all.
Could you please help?
Sincerely,
Nuno Peres
More information about the Gcc-bugs
mailing list