From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4172 invoked by alias); 6 Jan 2014 19:50:32 -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 Received: (qmail 4150 invoked by uid 48); 6 Jan 2014 19:50:27 -0000 From: "anlauf at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59398] Wrong bounds for allocatable result and for Date: Mon, 06 Jan 2014 19:50: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-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gmx dot de X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg00567.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59398 --- Comment #7 from Harald Anlauf --- (In reply to Dominique d'Humieres from comment #6) > (In reply to Harald Anlauf from comment #1) > > Thus the assignment from the allocatable function result is broken. > > Is it true? I looked at the discussion in the Intel Forum (c.f. comment #5) and I have to admit that I am unsure. Steve Lionel quotes the first two phrases of 12.3.3 Characteristics of function results The characteristics of a function result are its type, type parameters (if any), rank, whether it is polymorphic, whether it is allocatable, whether it is a pointer, whether it has the CONTIGUOUS attribute, and whether it is a procedure pointer. If a function result is an array that is not an allocatable or pointer, its shape is a characteristic. (I checked this with the F2k8 draft). Steve argues that it does not say whether its actual bounds are a characteristic. If you assume that only the shape matters, then the gfortran behavior is not a bug. I think it is up to the experts to discuss this and maybe submit an interpretation request.