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