From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4429A3858407; Sun, 13 Feb 2022 16:01:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4429A3858407 From: "cvs-commit 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: Sun, 13 Feb 2022 16:01:08 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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: Sun, 13 Feb 2022 16:01:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104228 --- Comment #7 from CVS Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:57da34939703a6e6d3267a0d25d1fb9369d3ac0e commit r12-7217-g57da34939703a6e6d3267a0d25d1fb9369d3ac0e Author: Mikael Morin Date: Fri Jan 28 22:00:57 2022 +0100 fortran: Unshare associate var charlen [PR104228] PR104228 showed that character lengths were shared between associate variable and associate targets. This is problematic when the associate target is itself a variable and gets a variable to hold the length, as the length variable is added (and all the variables following it in the chain) to both the associate variable scope and the target variable scope. This caused an ICE when compiling with -O0 -fsanitize=3Daddress. This change forces the creation of a separate character length for the associate variable. It also forces the initialization of the character length variable to avoid regressing associate_32 and associate_47 tests. PR fortran/104228 gcc/fortran/ChangeLog: * resolve.cc (resolve_assoc_var): Also create a new character length for non-dummy associate targets. * trans-stmt.cc (trans_associate_var): Initialize character len= gth even if no temporary is used for the associate variable. gcc/testsuite/ChangeLog: * gfortran.dg/asan/associate_58.f90: New test. * gfortran.dg/asan/associate_59.f90: New test.=