From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1AB123858CDB; Sun, 15 Jan 2023 20:07:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1AB123858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673813238; bh=ZfITxo2G7eGuUAIVsyzkaUrPsAWIo2iWj0/hif2KIyY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MBHlp4r7kn4wRbLgIHRQIUIFDsmhltDR6+kIsJu28hFBVt0jCzq1sfxOqgI+o3kIz fAudjWemwLOGPJ2JJOLXHRvqsulFotv/T0h6JqpLW78ZMeGDIDkqey5A/UsEhw4565 AjoVB6Rh/gxmL40zRzyFZyRw/fmRWsP4EJ1DFArU= From: "jvdelisle 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: Sun, 15 Jan 2023 20:07:16 +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: jvdelisle 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102595 --- Comment #8 from Jerry DeLisle --- I started to do some variations on the z1.f90 case: program p complex, parameter :: x(0) =3D 2 !data x%im /3.0/ print *, x end Running this prints a blank line; Looking at the -fdump-tree-original shows: parm.1.span =3D 8; parm.1.dtype =3D {.elem_len=3D8, .rank=3D1, .type=3D4}; parm.1.dim[0].lbound =3D 1; parm.1.dim[0].ubound =3D 0; parm.1.dim[0].stride =3D 1; parm.1.data =3D (void *) &x[0]; parm.1.offset =3D -1; Is it valid to have an ubound less than the lbound? program p complex, parameter :: x(1) =3D 2 !data x%im /3.0/ print *, x end The z2 case prints what is expected. It looks like we need to catch someth= ing in the parameter declaration before the data statement so that it is not garbage later. .. to be continued ..=