From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10458 invoked by alias); 23 Apr 2013 13:02:29 -0000 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 Received: (qmail 10420 invoked by uid 48); 23 Apr 2013 13:02:27 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/57048] New: [4.9 Regression] Handling of C_PTR and C_FUNPTR leads to reject valid Date: Tue, 23 Apr 2013 13:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01957.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57048 Bug #: 57048 Summary: [4.9 Regression] Handling of C_PTR and C_FUNPTR leads to reject valid Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org Reported by Angelo Graziosi at http://gcc.gnu.org/ml/fortran/2013-04/msg00210.html Using in file1: module m ... type t type(c_funptr) :: funptr end type and in file2: use iso_c_binding, ONLY: c_funloc use m type(t) :: x ... x%funptr = c_funloc(proc) fails with: Error: Can't convert TYPE(c_funptr) to INTEGER(4) at (1) The problem is that the .mod file only contains: win32_types.mod:5 'C_funptr' '__iso_c_binding' '' 1 ((DERIVED UNKNOWN-INTENT while the symtree is searched for "c_funptr". Workaround: Editing the .mod file and changing C_funptr to c_funptr.