From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8943 invoked by alias); 29 Jan 2011 16:40:12 -0000 Received: (qmail 8920 invoked by uid 22791); 29 Jan 2011 16:40:10 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 29 Jan 2011 16:40:02 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47042] ICE with character pointer in function X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Keywords 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 Date: Sat, 29 Jan 2011 17:37:00 -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 X-SW-Source: 2011-01/txt/msg03235.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47042 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code CC| |burnus at gcc dot gnu.org --- Comment #2 from Tobias Burnus 2011-01-29 16:39:57 UTC --- NAG shows the error: POINTER function PTMP needs an explicit interface Intel the error: This name has not been declared as an array or a function. [PTMP] get_cstring(i:i) = ptmp(i) -----------------------^ g95: Error: POINTER function 'ptmp' at (1) must have an explicit interface "A procedure other than a statement function shall have an explicit interface if it is referenced and [...] (3) the procedure has a result that (a) is an array, (b) is a pointer or is allocatable, or [...]" (F2008, "12.4.2.2 Explicit interface") One could add such a check in gfc_procedure_use: if (sym->attr.if_source == IFSRC_UNKNOWN) { [...] if (sym->attr.pointer && sym->attr.proc != PROC_ST_FUNCTION) { gfc_error (""); Possibly also needed for ALLOCATABLE and maybe even with Dimension?