From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F6643858CDA; Tue, 28 Mar 2023 07:58:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F6643858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679990284; bh=mbpssfb5v4iVYdNzkYSMw5QudEUCEmNm46lF/ZNjdg4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e+q+M2Owc1WfVSNwfOswu1Ld9eS7akK673/KwmpCV76pGesBKgLWoX7F5XlLOqHOS rScT0ikVoQckwzYaKKJ2OmYipsyWDL2PM1rBIcLTyfrN/F9oTRVyaRWlx1S7LCZEjG 2rz9lhHCwJJxOMKrCg3SDsKEtxj0bURb6o+vu0vw= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109304] [13 Regression] ICE in get_vrange, at value-range-storage.cc:87 when building Python 3.12.0_alpha6 since r13-6849-ged626f18b189920a Date: Tue, 28 Mar 2023 07:58:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D109304 --- Comment #6 from Richard Biener --- Early IPA visibility introduces a local alias (because of -fno-semantic-interposition). Local IPA pure-const makes PyUnicode_FindChar looping pure. IPA profile instruments the functions, but the .localalias () call remains pure. The issue is that node->set_pure_flag uses call_for_symbol_thunks_and_alias= es to apply the adjustments but the call adjustment now no longer updates all stmts but uses the same guard if (!gimple_has_body_p (node->decl) || !(!node->clone_of || node->decl !=3D node->clone_of->decl)) continue; (or rather just gimple_has_body_p), skipping updating the stmt. For const calls that would leave the const on the fntype, for pure calls as here this leaves the call not updated. We can either restore unconditional updating of all calls or fix the origin= al issue also for const calls to aliases by adjusting the check. Maybe like /* We do not clear pure/const on decls without body. */ tree fndecl =3D gimple_call_fndecl (call); cgraph_node *callee; if (fndecl && (callee =3D cgraph_node::get (fndecl)) && callee->get_availability (node) =3D=3D AVAIL_NOT_AVA= ILABLE) continue; that works, but not sure if by design. Will test that.=