From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5807 invoked by alias); 13 Dec 2010 21:59:31 -0000 Received: (qmail 5791 invoked by uid 22791); 13 Dec 2010 21:59:30 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Mon, 13 Dec 2010 21:59:24 +0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46849] [OOP] MODULE PROCEDURE resolution does not work in BLOCK or SELECT TYPE 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, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: janus 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: 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: Mon, 13 Dec 2010 21:59: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: 2010-12/txt/msg01514.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46849 --- Comment #4 from janus at gcc dot gnu.org 2010-12-13 21:59:21 UTC --- (In reply to comment #3) > Here is a reduced test case for the rejects-valid part, without CLASS and > ISO_C_BINDING: Not sure if it's the perfectly right thing to do, but the following patch fixes the test cases in comment #3 and #1: Index: gcc/fortran/symbol.c =================================================================== --- gcc/fortran/symbol.c (revision 167765) +++ gcc/fortran/symbol.c (working copy) @@ -2717,7 +2717,7 @@ gfc_get_sym_tree (const char *name, gfc_namespace /* This doesn't usually happen during resolution. */ if (ns == NULL) - ns = gfc_current_ns; + ns = gfc_find_proc_namespace (gfc_current_ns); /* Try to find the symbol in ns. */ st = gfc_find_symtree (ns->sym_root, name);