From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F2DF3858D1E; Fri, 2 Sep 2022 06:49:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F2DF3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662101394; bh=CD+s17cshVAoBpH8Jnn0Fquv0blhRpoe0Kd3umaPqIY=; h=From:To:Subject:Date:From; b=UiHUvSVxvpOaTyeetDpWRHFK4cfd9ZuqooMWtlA3OJ7tqt/VY/ULmnBlfKL1Dq7QP g94Q1pYJn/0CQlwD4Xjw7vl7Zxyh1oWCVo8brw5q5KD4bWNPK+rC3gIFp20gtNNyEX aTrCyIMegkfmQ1W4ApgRXkd50ntwP4mnjPSqGhks= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106811] New: GENERIC and GIMPLE IL undefined behavior needs documenting Date: Fri, 02 Sep 2022 06:49:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D106811 Bug ID: 106811 Summary: GENERIC and GIMPLE IL undefined behavior needs documenting Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- Undefined behavior triggered by the GENERIC operations from tree.def (also = used in GIMPLE) need to be documented. In general we follow C here, including G= CCs implementation defined behavior here, but not all C undefined behavior cases are exploited by the middle-end so the state of those cases is not clear. = We need - a list of operations with undefined behavior cases that are currently exploited or seen as OK to exploit - a list of operations where C documents undefined behavior cases but the middle-end conciously defines some implementation defined behavior (which should not be target specific) - middle-end predicates that can be used to check - variants of the operations with (implementation) defined behavior probably best in generic.texi with cross reference from gimple.texi Note for RTL operations doing the same is necessary.=