From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20642 invoked by alias); 20 Oct 2010 17:45:42 -0000 Received: (qmail 20628 invoked by uid 22791); 20 Oct 2010 17:45:41 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID 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; Wed, 20 Oct 2010 17:45:34 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46100] [Fortran 2008] Non-variable pointer expression as actual argument to INTENT(OUT) non-pointer dummy X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: Summary 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: Wed, 20 Oct 2010 17:45: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-10/txt/msg01699.txt.bz2 Message-ID: <20101020174500.B4HsAkzU6BIbXSRkeWYmB7q6zPW9kGYz6DtJ_Mq9uPw@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46100 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Non-variable pointer |[Fortran 2008] Non-variable |expression as actual |pointer expression as |argument to INTENT(OUT) |actual argument to |non-pointer dummy |INTENT(OUT) non-pointer | |dummy --- Comment #2 from Tobias Burnus 2010-10-20 17:45:27 UTC --- After carefully reading the interpretation request, http://www.j3-fortran.org/doc/year/08/08-172.txt, I think the reason that it is invalid in Fortran 95/2003 is that only variables are definable and as "f()" is not a variable, it is invalid. Fortran 2008 has (cf. PR 40054): R602 variable is designator or expr C602 (R602) expr shall be a reference to a function that has a pointer result." Which makes the program valid.