From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 661B6385AC2E; Fri, 28 Jan 2022 16:19:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 661B6385AC2E From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/104228] [9/10/11/12 Regression] ICE in df_install_ref, at df-scan.cc:2294 since r8-3589-g707905d0773e5a8e Date: Fri, 28 Jan 2022 16:19: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-Version: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Fri, 28 Jan 2022 16:19:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104228 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- If the testcase is extended to: program p character(:), save, allocatable :: x(:) call s1 call s2 call s3 call s4 contains subroutine s1 associate (y1 =3D> x) y1 =3D [x] end associate end subroutine s2 associate (y2 =3D> x) y2 =3D [x] end associate end subroutine s3 associate (y3 =3D> x) y3 =3D [x] end associate end subroutine s4 associate (y4 =3D> x) y4 =3D [x] end associate end end then the p program contains just one of those y vars (y4/.y4): __attribute__((fn spec (". "))) void p () { static voidD.27 s4D.4214 (void); static voidD.27 s3D.4216 (void); static voidD.27 s2D.4218 (void); static voidD.27 s1D.4220 (void); struct array01_character(kind=3D1) y4D.4244; static integer(kind=3D8)D.9 .y4D.4222; static struct array01_character(kind=3D1) xD.4255 =3D {.dataD.4250=3D0B}; bitsizetype D.4401; sizetype D.4402; D.4401 =3D (bitsizetype) (sizetype) NON_LVALUE_EXPR <.y4D.4222> * 8; D.4402 =3D (sizetype) NON_LVALUE_EXPR <.y4D.4222>; s1D.4220 (); s2D.4218 (); s3D.4216 (); s4D.4214 (); } Now, if that .y4 randomly called based on one of the associate users is just named character length of the x array (shouldn't it be called .x ?) of a SAVE var in p, I'd think it should= go to the BLOCK where x is defined and nowhere else, all the nested functions = (=3D=3D contained subroutines) should refer to it non-locally and shouldn't have it= in its BLOCK_VARS.=