From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96C803857C60; Thu, 25 Mar 2021 11:43:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96C803857C60 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99765] Explicit dimension size declaration of pointer array allowed Date: Thu, 25 Mar 2021 11:43:58 +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.4 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: cf_reconfirmed_on bug_status everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2021 11:43:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99765 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-03-25 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- The standard says: C832 An array with the POINTER or ALLOCATABLE attribute shall have an array-spec=20 that is a deferred-shape-spec-list. so I think real, dimension(10), pointer :: a(:) =3D> null() and real, dimension(10), allocatable :: a(10) are invalid and shall give an error. Note that a(1:2)(1:10) looks like C syntax, a rank 2 array is a(1:2,1:10). The only case for valid fortran is for a being of type CHARACTER, a(1;2) be= ing a slice and (1:10) a substring.=