From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22618 invoked by alias); 27 Aug 2012 22:11:02 -0000 Received: (qmail 22600 invoked by uid 22791); 27 Aug 2012 22:11:00 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_NL 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, 27 Aug 2012 22:10:47 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54387] New: Proc-pointer: Wronlgy accepts non-proc result variable on the RHS of a pointer assignment Date: Mon, 27 Aug 2012 22:11: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: accepts-invalid 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 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: 2012-08/txt/msg01823.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54387 Bug #: 54387 Summary: Proc-pointer: Wronlgy accepts non-proc result variable on the RHS of a pointer assignment Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org CC: janus@gcc.gnu.org Found by James Van Buskirk in c.l.f's "Function questions?" thread: https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/r4PVbtaBnFM The following program is invalid as "foo" inside the function is the result variable - hence "i => foo" doesn't make sense. function foo() integer :: foo procedure(), pointer :: i i => foo ! Invalid RHS - in this context "foo" the RESULT variable ! To use the procedure name, a RESULT(...) has to be specified end