From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22809 invoked by alias); 8 Apr 2013 08:11:54 -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 22353 invoked by uid 48); 8 Apr 2013 08:11:46 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56261] [OOP] seg fault call procedure pointer on polymorphic array Date: Mon, 08 Apr 2013 08:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: janus at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: 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/msg00603.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56261 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #13 from Tobias Burnus 2013-04-08 08:11:44 UTC --- (See also thread ending with http://gcc.gnu.org/ml/fortran/2013-04/msg00048.html) Regarding comment 1, using procedure( ), pointer :: f => ff as well as something like external :: ggg procedure(ff), pointer :: f => ggg is invalid as "ff" has a class dummy argument, which mandates an explicit interface (F2008, 12.4.2.2, (2)(a); cf. comment 6) and Fortran 2008 demands: "If the characteristics of the pointer object or the pointer target are such that an explicit interface is required, both the pointer object and the pointer target shall have an explicit interface." (para 4 of "7.2.2.4 Procedure pointer assignment") [Those aren't constraints, hence, the compiler is not required to diagnose it - nor can it do so in general. However, if the explicit interface of "ff" is available, as comment 1, it can. Thus, a diagnostic would be nice.]