[Bug fortran/30411] gfortran MODULE bug for non trivial data types
kargl at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jan 9 01:26:00 GMT 2007
------- Comment #1 from kargl at gcc dot gnu dot org 2007-01-09 01:26 -------
If you move the module unit above the main program, so that the
module has been compiled by the time the main USEs it, then with
gfortran 4.3.0 I get
laptop:kargl[211] gfc4x -c n.f
n.f: In function 'distance':
n.f:5: warning: Function return value not set
n.f:26.22:
L=Distance(Point1,Point2)
1
Error: Type/rank mismatch in argument 'point1' at (1)
which is correct. Furthermore, if I move the define of
the derived above the CONTAINS and remove the private
version in the function and subroutine, I get
laptop:kargl[217] gfc4x -c n.f
n.f: In function 'distance':
n.f:10: warning: Function return value not set
which is the expected output.
In short, grab a newer version of gfortran from the gfortran
wiki or build gfortran for the 4.2 or 4.3 branch. Additionally,
your code needs some improvements.
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu dot org
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30411
More information about the Gcc-bugs
mailing list