From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F32EF385843D; Wed, 16 Feb 2022 21:56:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F32EF385843D From: "marc@nieper-wisskirchen.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/89479] __restrict on a pointer ignored when disambiguating against a call Date: Wed, 16 Feb 2022 21:56:35 +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: 8.3.0 X-Bugzilla-Keywords: alias, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: marc@nieper-wisskirchen.de 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2022 21:56:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89479 --- Comment #11 from Marc Nieper-Wi=C3=9Fkirchen --- (In reply to Richard Biener from comment #1 of bug 94416) > I think there's a duplicate somewhere. We currently cannot encode "restr= ict" > into the "accesses" implied by a call. >=20 > Note there's slight complication when g (b) eventually recurses into 'f' > passing this 'b' as 'a'. Recursion makes the interpretation of the > lexically defined restrict concept a bit weird. >=20 > So I think this bug can be closed as duplicate of the "restrict and calls" > bug. >=20 > *** This bug has been marked as a duplicate of bug 89479 *** What do you mean by that the restrict concept is lexically defined? If I re= ad the standard correctly, restrict makes an assumption about the dynamic exte= nt of an executed block. This seems obvious from section 6.7.3.1 (of ISO C18) which speaks of the block of main in paragraph 2 and the lifetime of object= s in paragraph 5.=