This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37829] Incorrect name mangling with iso_c_binding
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2010 08:48:32 -0000
- Subject: [Bug fortran/37829] Incorrect name mangling with iso_c_binding
- References: <bug-37829-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from burnus at gcc dot gnu dot org 2010-07-09 08:48 -------
For intrinsic modules, we currently have:
use iso_c_binding, only: c_null_ptr
which use-associates a constant (PARAMETER) of the type "c_ptr" - but "c_ptr"
is not imported directly; to make the type information available, gfortran
currently imports "c_ptr" in a hidden way (_gfortran_...).
But the problem is the same for nonintrinsic modules. Thus, the question is:
How does it work there - it obviously does:
module m
type t; end type
end module m
module m2
use m
! private; public :: null
type(t), parameter :: null = t()
end module m2
module m3
use m
! private; public :: sub
contains
subroutine sub(x); type(t) :: x; end subroutine
end module m3
use m2, only: null
use m3, only: sub
call sub(null)
contains
subroutine sub2(); use m; type(t) :: y; y = null; end subroutine
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37829