From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8ED9F3858D35; Thu, 23 Dec 2021 20:15:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8ED9F3858D35 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102595] ICE in var_element, at fortran/decl.c:298 since r10-5607-gde89b5748d68b76b Date: Thu, 23 Dec 2021 20:15:30 +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: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org 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: 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, 23 Dec 2021 20:15:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102595 --- Comment #4 from kargl at gcc dot gnu.org --- Comment on attachment 52053 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52053 patch This patch fixes the problem in the PR and addresses a few niggles I found as I poked gfortran. Some of those errors don't occur without this patch. program p complex, parameter :: x(0) =3D 2 ! complex :: x(0) =3D 2 ! { dg-error "more values than variabl= es" } ! complex :: x(1) =3D 2 ! { dg-error "already is initialized" } ! complex :: x =3D 2 ! { dg-error "already is initialized" } ! complex :: x(1) ! Works (as expected?) ! complex :: x(0) ! { dg-error "more values than variables= " } data x%re /3.0/ print *, x%re end=