From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 805 invoked by alias); 9 Jul 2010 08:48:48 -0000 Received: (qmail 725 invoked by uid 48); 9 Jul 2010 08:48:32 -0000 Date: Fri, 09 Jul 2010 08:48:00 -0000 Message-ID: <20100709084832.724.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/37829] Incorrect name mangling with iso_c_binding In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg00973.txt.bz2 ------- 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