This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/17379] Generic functions not resolved
- From: "matthew dot amos at baesystems dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Sep 2004 10:49:21 -0000
- Subject: [Bug fortran/17379] Generic functions not resolved
- References: <20040909162101.17379.CARendleman@lbl.gov>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From matthew dot amos at baesystems dot com 2004-09-27 10:49 -------
I have some code which triggers the same bug (I think). If it helps, I have
reproduced the code here. The funny thing is; it works if you replace "length"
with "length_R4" in normalise_R4.
module module_vec3d
implicit none
! Public procedures
private
public :: normalise, length
! Module constants
integer, parameter :: SP = selected_real_kind(6)
integer, parameter :: DP = selected_real_kind(12)
! Vector length
INTERFACE length
MODULE PROCEDURE length_R4
END INTERFACE
! Vector normalise
INTERFACE normalise
MODULE PROCEDURE normalise_R4
END INTERFACE
CONTAINS
FUNCTION length_R4 (x) result (y)
real(SP) :: y
real(SP), intent(in) :: x(3)
y = sqrt(x(1)**2 + x(2)**2 + x(3)**2)
END FUNCTION length_R4
FUNCTION normalise_R4 (x) result (y)
real(SP) :: y(3)
real(SP), intent(in) :: x(3)
y = x / length(x)
END FUNCTION normalise_R4
END MODULE module_vec3d
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17379