From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 349073858C27; Wed, 25 Oct 2023 05:46:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 349073858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698212787; bh=PBB1X4N9EpJc/CosAz9PSZfRIGy7jtgvKTOG1XZohAQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gYGWuNTfYqOhAzyzN8pF2WzxNU8vYoUXTuP/8Da/Asrkl9AHlnMKcKn9rY2M6g6mt h3VqXe79GuuiDXBfLaHbK4y9KEZBL0J54D7Cr7WyQbh99VC9K7cB7Y9j6or0AhV8KP ad7UOX7DtvdlRY6sdFxta1VjYHgL2zWzobRipZU8= From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/96503] attribute alloc_size effect lost after inlining Date: Wed, 25 Oct 2023 05:46:26 +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: muecker at gwdg dot de 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: cc 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 Martin Uecker changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |muecker at gwdg dot de --- Comment #3 from Martin Uecker --- Was just to file this bug...=20=20 Note that the access attribute could be translated into the same builtin suggested for counted_by in https://gcc.gnu.org/pipermail/gcc-patches/2023-October/634177.html and then this could work. This would also simply the BDOS path I think bec= ause special code for the access attribute could go. Example: https://godbolt.org/z/1TTePn7hn=20 static #if 0 char *propagate(char *p, int s) [[gnu::access(read_only, 1, 2)]] #else char *propagate(char *p; int s;=20 char p[(p =3D pointer_with_size(p, s), s)], int s) #endif { printf("%ld\n", __builtin_dynamic_object_size(p, 0)); return p; }=