public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39253]  New: A bug with interface in gfortran
@ 2009-02-20  4:35 bubin at qcri dot or dot jp
  2009-02-20  7:01 ` [Bug fortran/39253] " burnus at gcc dot gnu dot org
  2009-02-20  8:06 ` bubin at qcri dot or dot jp
  0 siblings, 2 replies; 3+ messages in thread
From: bubin at qcri dot or dot jp @ 2009-02-20  4:35 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/39253] A bug with interface in gfortran
  2009-02-20  4:35 [Bug fortran/39253] New: A bug with interface in gfortran bubin at qcri dot or dot jp
@ 2009-02-20  7:01 ` burnus at gcc dot gnu dot org
  2009-02-20  8:06 ` bubin at qcri dot or dot jp
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-02-20  7:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2009-02-20 07:00 -------
Thanks for the report. However, GCC/gfortran 4.1.0 is quite old. (GCC 4.0.0 was
the first version which contained gfortran, which was at that time very buggy.
Version 4.1.x was quite usable, but still contained a few bugs (especially
4.1.0).)

Could you update to a newer version?

4.2.x is much better than 4.1.x, but the recommended version is either 4.3.3
(latest stable version) or 4.4 (latest developer version, which should be soon
released). You might try a build at http://gcc.gnu.org/wiki/GFortranBinaries


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39253


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/39253] A bug with interface in gfortran
  2009-02-20  4:35 [Bug fortran/39253] New: A bug with interface in gfortran bubin at qcri dot or dot jp
  2009-02-20  7:01 ` [Bug fortran/39253] " burnus at gcc dot gnu dot org
@ 2009-02-20  8:06 ` bubin at qcri dot or dot jp
  1 sibling, 0 replies; 3+ messages in thread
From: bubin at qcri dot or dot jp @ 2009-02-20  8:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bubin at qcri dot or dot jp  2009-02-20 08:05 -------
It looks like this bug has been fixed since version 4.1. I tried to compile the
code with a newer version of gfortran, 4.3.2, and everything went fine.
Apologies for a wrong alarm.


-- 

bubin at qcri dot or dot jp changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39253


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-20  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-20  4:35 [Bug fortran/39253] New: A bug with interface in gfortran bubin at qcri dot or dot jp
2009-02-20  7:01 ` [Bug fortran/39253] " burnus at gcc dot gnu dot org
2009-02-20  8:06 ` bubin at qcri dot or dot jp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).