From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1DC28385840B; Sat, 20 Jan 2024 15:50:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DC28385840B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705765850; bh=xMouqKzY72gi0Zkx76B88b/vp3hjZCd6grZKGdUaor4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gmQQ5+Ht+wyOXwxkYiTDiqvA97UAXbWv0v7rphSYxbbcHp9D8kodN/hkQAWPydeMa pboA1ngeLkKu8R64h/BpoGXr94AxYy00uimkVXjxiEZSxKk/kq7+Zt8rS0WxHRWh2v PJLH04c9U/tOmJS1mwbxrOvNCHaxBv2W8W7UYkPY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48776] ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE Date: Sat, 20 Jan 2024 15:50:47 +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.7.0 X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code X-Bugzilla-Severity: minor X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mikael 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=3D48776 --- Comment #12 from GCC Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:6930e1f1055c39bea170c25f694f7301989e5d1d commit r14-8305-g6930e1f1055c39bea170c25f694f7301989e5d1d Author: Mikael Morin Date: Fri Jan 19 18:47:36 2024 +0100 fortran: Restore current interface info on error [PR111291] This change is a followup to the fix for PR48776 (namely r14-3572-gd58150452976c4ca65ddc811fac78ef956fa96b0 AKA fortran: Restore interface to its previous state on error [PR48776]), which cleaned up new changes from interfaces upon error. Unfortunately, there is one case in that fix that is mishandled, visible on unexpected_interface.f90 with valgrind or an asan-instrumented gfort= ran. when an interface statement is found while parsing an interface body (w= hich is invalid), the current interface is replaced by the one from the new statement, and as parsing continues, new procedures are added to the new interface, which has been rejected and freed, instead of the original one. This change restores the current interface pointer to its previous value on each rejected statement. PR fortran/48776 PR fortran/111291 gcc/fortran/ChangeLog: * parse.cc: Restore current interface to its previous value on error.=