This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: ran intrinsic bug?
On Sat, Feb 26, 2005 at 02:00:57PM -0800, Jerry DeLisle wrote:
> Steve Kargl wrote:
> >Add "EXTERNAL RAN" to your code; otherwise gfortran will see
> >RAN() as its intrinsic.
> >
> I tried this and I still get the same error. g77 compiles and runs fine
> with "EXTERNAL RAN" added.
>
I would need to see haow you're trying link the program
cat jt.f
program jt
integer i(2)
double precision ran
external ran
i(1) = 1
i(2) = 2
print *, ran(i)
end
kargl[212] gfc -o jt jt.f
/var/tmp/cc3JEOQG.o(.text+0x49): In function `MAIN__':
: undefined reference to `ran_'
collect2: ld returned 1 exit status
cat ran.f
function ran(i)
double precision ran
integer i
ran = 1. * i
end
kargl[221] gfc -c ran.f
kargl[222] gfc -o jt jt.f ran.o
kargl[223] ./jt
1.00000000000000
--
Steve