------- 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