From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A0725385840B; Tue, 8 Aug 2023 10:26:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0725385840B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691490394; bh=3o/gbJfWRuOP2ju0NtJsz/1OeVrpsRifnhOGrzrEBe4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qu4n6gz8iyFsyV4C0yoCxT/86edWIIzOAHS2tAPOjKEp02PnB9doRZX0YGqoYWPHh sTpytBgMoI8ENS5t799yTYXX/Co5tQptiofNT2aqgdSLWZE+LBubtKFhLrmb8lG/AT ltOsyhVMWJJjtYKUNJdL5sgbBdoVLEMEELSzXSGI= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110924] [14 Regression] ICE on valid code at -O{s,2,3} on x86_64-linux-gnu: verify_ssa failed Date: Tue, 08 Aug 2023 10:26:33 +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: 14.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: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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=3D110924 --- Comment #12 from Richard Biener --- (In reply to Richard Biener from comment #11) > Variant (1) is just the following, but I'm unsure as to the possible effe= cts > of that ... (test coverage will be very low anyway) >=20 > diff --git a/gcc/tree-ssa-operands.cc b//gcc/tree-ssa-operands.cc > index 57e393ae164..c8ac98b4e06 100644 > --- a/gcc/tree-ssa-operands.cc > +++ b/gcc/tree-ssa-operands.cc > @@ -696,7 +696,8 @@ operands_scanner::maybe_add_call_vops (gcall *stmt) > /* A 'pure' or a 'const' function never call-clobbers anything. */ > if (!(call_flags & (ECF_PURE | ECF_CONST))) > add_virtual_operand (opf_def); > - else if (!(call_flags & ECF_CONST)) > + else if (!(call_flags & ECF_CONST) > + || (call_flags & ECF_NORETURN)) > add_virtual_operand (opf_use); > } > } That ICEs for example tree-ssa/cunroll-4.c because that inserts __builtin_unreachable () calls and this function is explicitly marked const noreturn (if you use that combo manually you get a diagnostic). The ICE is because cunroll doesn't add virtual operands or updates SSA. But it also shows that sinking into __builtin_unreachable () ending regions will have the same issue and the ipa pure-const/modref fix won't fix that. I'm going to try fixing the live problem :/=