From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24153 invoked by alias); 5 Oct 2011 14:36:40 -0000 Received: (qmail 24019 invoked by uid 22791); 5 Oct 2011 14:36:39 -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, 05 Oct 2011 14:35:46 +0000 From: "paul.richard.thomas at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47844] Array stride ignored for pointer-valued function results Date: Wed, 05 Oct 2011 14:36: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: wrong-code X-Bugzilla-Severity: minor X-Bugzilla-Who: paul.richard.thomas at gmail dot com 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" Content-Transfer-Encoding: quoted-printable 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-10/txt/msg00251.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D47844 --- Comment #6 from paul.richard.thomas at gmail dot com 2011-10-05 14:35:14 UTC --- Dear Tobias and Dominique, We could fix this in 4.7 by adding a sm field to array descriptors. If we added the sm field after the dimension array, we would not damage the exiting API. On Tue, Mar 1, 2011 at 2:20 PM, burnus at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D47844 > > Tobias Burnus changed: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 What =C2=A0 =C2=A0|Removed =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |Added > -------------------------------------------------------------------------= --- > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Summary|I/O: data transfer =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|Array stride ignored for > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |statement= : Array stride =C2=A0 =C2=A0 |pointer-valued function > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |ignored f= or pointer-valued =C2=A0|results > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |function = results =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| > > --- Comment #3 from Tobias Burnus 2011-03-01 = 13:20:28 UTC --- > Does not only affect I/O but also assignment; cf. example below. > > =C2=A0integer, target :: tgt(5) =3D [1,2,3,4,5] > =C2=A0integer :: var(3) > =C2=A0var =3D f(tgt) ! should assign 1 3 5 > =C2=A0print *, ptr ! but =C2=A0 =C2=A0prints 1 2 3 > contains > =C2=A0function f(x) > =C2=A0 =C2=A0integer, target :: x(:) > =C2=A0 =C2=A0integer, pointer :: f(:) > =C2=A0 =C2=A0f =3D> x(::2) > =C2=A0end function f > end > > -- > Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=3Demail > ------- You are receiving this mail because: ------- > You are on the CC list for the bug. >