From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11393 invoked by alias); 9 Nov 2006 18:48:12 -0000 Received: (qmail 11302 invoked by uid 48); 9 Nov 2006 18:47:59 -0000 Date: Thu, 09 Nov 2006 18:48:00 -0000 Subject: [Bug fortran/29785] New: Fortran 2003: POINTER Rank Remapping X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg00781.txt.bz2 List-Id: POINTER Rank Remapping (From http://www.fortran.bcs.org/forum2002/f2000dme.htm) Motivation: ability to have pointers to diagonals of matrices. REAL,ALLOCATABLE,TARGET :: base_array(:) REAL,POINTER :: matrix(:,:) REAL,POINTER :: diagonal(:) ... ALLOCATE(base_array(n*n)) matrix(1:n,1:n) => base_array ! rank remapping diagonal => base_array(::n+1) Notes: * The base array must be rank one, to ensure that the remapping is a simple linear transformation. * Both lower bound and upper bound must be specified for each dimension. Fortran 2003 standard, see "7.4.2.1 Data pointer assignment": "R735 pointer-assignment-stmt is data-pointer-object [ (bounds-spec-list) ] => data-target or data-pointer-object (bounds-remapping-list ) => data-target or proc-pointer-object => proc-target C718 (R735) If bounds-spec-list is specified, the number of bounds-specs shall equal the rank of data pointer-object. C719 (R735) If bounds-remapping-list is specified, the number of bounds-remappings shall equal the rank of data-pointer-object. C720 (R735) If bounds-remapping-list is specified, data-target shall have rank one; otherwise, the ranks of data-pointer-object and data-target shall be the same." and "7.4.2.1 Data pointer assignment": "If bounds-remapping-list is specified, data-target shall not be a disassociated or undefined pointer, and the size of data-target shall not be less than the size of data-pointer-object. The elements of the target of data-pointer-object, in array element order (6.2.2.2), are the first SIZE(data-pointer-object) elements of data-target." -- Summary: Fortran 2003: POINTER Rank Remapping Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 20585 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29785