From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5116A385841B; Wed, 25 Oct 2023 11:08:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5116A385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698232082; bh=6MFE9wBPYX/OJW5Ru1b5ojSVBG740C5kRLvKhxuo1mg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cuplt60/WuqGAttmUrbGHv40kWABGO9+xPT/SbgtKo3S2bGClZVJLIIAE4hTTVlsY T/5mxS+AT015uh+rtx1Es6IlB/qvvv1VrUz1ceECOLeydTNDSghGTRkE7gsNXKsjY8 INX/HQaT+oO0oHyTOSqJ7cuuO/5MvvN5k+8aj1Sc= From: "siddhesh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/96503] attribute alloc_size effect lost after inlining Date: Wed, 25 Oct 2023 11:08:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh 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=3D96503 --- Comment #6 from Siddhesh Poyarekar --- So basically, __builtin_with_access(void *ptr, size_t size, int access) where access =3D=3D -1: Unknown access semantics 0: none 1: read_only 2: write_only 3: read_write should address both access and alloc_size and even counted_by. We would ne= ed to emit the builtin in the caller as well as callee of the function that has the access attribute while for alloc_size, we only need to emit this in the caller.=