From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 25663383E538; Wed, 5 Jun 2024 08:23:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25663383E538 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717575828; bh=1lMic0P3Nls/qd65jWKp3/CYEY0Dlp6vI1F1TccHej4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pmWCYhdJmaTDw53M04c3ECmhZvL5YVr8UohLR4yynp4CuFqXCKWTiL/FMj+r52Ec5 BhR2YHo0klU99tJyJ3Stk1NJs+JtCpc58PnTKoBYyNblqs91idFFPNevPck+shcGES DJdiulxLCTCgGVw51ocqiKD88WErmErZ0eSjmkFs= From: "user202729 at protonmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110137] implement clang -fassume-sane-operator-new Date: Wed, 05 Jun 2024 08:23:27 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: user202729 at protonmail dot com X-Bugzilla-Status: NEW 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=3D110137 --- Comment #14 from user202729 --- Regarding alias analysis. The current implementaion is such that: compiler | flag | can alias?| can modify global?| gcc | sane | no | no | << NEW | no-sane [default]| no | yes | clang | sane [default] | no | no | | no-sane | yes | yes | [the standard]| | no | yes | As pointed out in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110035#c13= , gcc already assume operator new's retuned pointer cannot alias any existing pointer. So no change is needed there.=