From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE0D93858C53; Fri, 17 Mar 2023 09:24:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE0D93858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679045084; bh=adfhXheYBIVywia7ON11IT0Xv4KKIe3iyFaN/BlTUOo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=y5dYkl5Os3uOhIU9lFJ/4/ED8xbW78tJ5/FFir3OpSIX7PF9JcJs37YHKQIBr1cbj Cdc+G+UZjKjdBDoo4a6VdPLMHznltkPHXmy+71VOqvgzFNuJdA/iH8Ghxle82+kFn8 /MogeogSv1qqKovMPLN822vt/UnajSU/VzxF10z4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105554] [10/11/12/13 Regression] ICE: in emit_block_move_hints, at expr.cc:1829 since r9-5509-g5928bc2ec06dd4e7 Date: Fri, 17 Mar 2023 09:24:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105554 --- Comment #17 from Jakub Jelinek --- (In reply to Richard Biener from comment #16) > Ick - that's one of the worst place to do this ... what happens if we > postpone setting DECL_RESULT/DECL_ARGUMENTS to after initialize_cfun > (and remove the setting of them there)? If DECL_RESULT is NULL, then allocate_struct_function will segfault. I think if DECL_ARGUMENTS was NULL there, it would be ok with it. But initialize_cfun starts with: if (!DECL_ARGUMENTS (new_fndecl)) DECL_ARGUMENTS (new_fndecl) =3D DECL_ARGUMENTS (callee_fndecl); if (!DECL_RESULT (new_fndecl)) DECL_RESULT (new_fndecl) =3D DECL_RESULT (callee_fndecl); which makes it redundant with the only caller of it doing: DECL_RESULT (new_decl) =3D DECL_RESULT (old_decl); DECL_ARGUMENTS (new_decl) =3D DECL_ARGUMENTS (old_decl); initialize_cfun (new_decl, old_decl, new_entry ? new_entry->count : old_entry_block->count);=