This is my first report at gcc Bugzilla... I tried to compile a fortran program that invokes QD library (multiprecision arithmetic, available at http://www.cs.berkeley.edu/~yozo/software/qd-2.3.7.tar.gz). When I use Intel compiler suite, everything is fine. If I switch to gcc (the performance of QD is much better when it is compiled with g++ rather than Intel C++) then I get the following error message:
In file f_main.f90:17 call random_number(s) 1 Error: There is no specific subroutine for the generic 'random_number' at (1) make: *** [f_main.o] Error 1 I have investigated the issue a little it and came to the conclusion that there is something wrong with interfacing in gfortran. The QD library has fortran modules called ddmod.f90 and qdmod.f90 which contain the following: interface random_number module procedure ddrand end interface interface random_number module procedure qdrand end interface random_number is interfaced to allow it to be called with the types or real numbers implemented in QD [type(qd_real) and type(dd_real)]. But in my code I want to call random_number with standard real(8) type. Intel fortran has no problems with it, the compilation goes fine and the program runs as expected. So there must be a bug in gfortran. In order to make things work I simply removed those interfaces from qdmod.f90 and ddmod.f90 (I don't need random_number with type(qd_real) and type(dd_real) anyway). After doing that everything goes fine. -- Summary: A bug with interface in gfortran Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bubin at qcri dot or dot jp http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39253