This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33942] New: FreeBSD gfortran interprets an external function as a library function?
- From: "michael dot a dot richmond at nasa dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Oct 2007 18:09:22 -0000
- Subject: [Bug fortran/33942] New: FreeBSD gfortran interprets an external function as a library function?
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When I compile the program listed below using the FreeBSD version of gfortran I
get the message:
/var/tmp//ccTgf1if.o(.text+0x1f): In function `MAIN__':
: undefined reference to `tgammaf'
collect2: ld returned 1 exit status
I noticed this problem in the October 26 snapshot of gfortran. I don't recall
whether it occurs in earlier versions.
I do not see this problem in Linux.
The problem goes away if I insert the declaration "EXTERNAL gamma" into the
main program.
PROGRAM pgamma
y = gamma(x)
END PROGRAM pgamma
FUNCTION gamma(x)
gamma = 0.0
END FUNCTION gamma
--
Summary: FreeBSD gfortran interprets an external function as a
library function?
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33942