From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31213 invoked by alias); 23 Nov 2011 16:41:33 -0000 Received: (qmail 31077 invoked by uid 22791); 23 Nov 2011 16:41:32 -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; Wed, 23 Nov 2011 16:41:17 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/51284] [OOP] CLASS and VALUE attribute: No copy to temporary done Date: Wed, 23 Nov 2011 16:47: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: rejects-valid, wrong-code 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: Keywords 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 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-11/txt/msg02333.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51284 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid --- Comment #1 from Tobias Burnus 2011-11-23 16:40:57 UTC --- (In reply to comment #0) > If one uncomments "test2", it fails with: > Error: VALUE attribute conflicts with DIMENSION attribute at (1) > However, in Fortran 2008 this restriction is not present: > > C558 An entity with the VALUE attribute shall not have the ALLOCATABLE, > INTENT (INOUT), INTENT (OUT), POINTER, or VOLATILE attributes. In Fortran 2003: "C527 (R501) If the VALUE attribute is specified, the PARAMETER, EXTERNAL, POINTER, ALLOCATABLE, DIMENSION, VOLATILE, INTENT(INOUT), or INTENT(OUT) attribute shall not be specified." Note that the VALUE attribute is now allowed for EXTERNAL, e.g. subroutine foo(x) procedure(), VALUE :: x As one may not modify "x" (only if it had a pointer attribute, but that's not allowed), it does not affect the code generation.