From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D2BE93858C2C; Wed, 14 Sep 2022 11:54:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2BE93858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663156484; bh=AOJ7/xCieg4QHVIKitmApoT3imXrntnuRvFT0rzpgwo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oyt+Auk0R8DBW20wL8xAyHiYkpMmKamK9Q/HN8ow/NVxFPL3Y1x/bFFhdKvtxkGvt BuXXGTB2ST5v2+O1KGaizoOXQEYID6VJvd0aJWB18NV2zWI+P6oruw+VtILuEEsV8+ wr/m3POtcZQlspwwM1tiapPYyOTeaQLNXmIU6jAg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106654] [C++23] P1774 - Portable assumptions Date: Wed, 14 Sep 2022 11:54:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D106654 --- Comment #4 from Jakub Jelinek --- Note, I think for [[assume(i =3D=3D j)]]; we can just emit if (i =3D=3D j) = ; else __builtin_unreachable (); - it is just the TREE_SIDE_EFFECTS case that would need the extra treatment (I think the no side-effect cases will be occur of= ten enough that it is worth avoiding the outlining etc. costs). Well, possibly also anything that could trap or fault or with some expression size limit. If it doesn't have side-effects and can't trap/fault, we either DCE it, or = it doesn't result in visible side-effects. But possible floating point side-effects, or integer division by zero, or memory dereferences etc. shou= ld go the new way.=