This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/37829] Incorrect name mangling with iso_c_binding



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]