From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5B0203856944; Sun, 29 Oct 2023 06:48:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B0203856944 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698562099; bh=XGaACd0BgaNySBlDguyqkYfcpTXtpNzWpqgL4ZzUbtI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=T+2AIEiVPFrBHjKXXGDSnGAworlDo2U9nmDIOeaNjziuYs1u3YauUzu+ijGc6Vjg+ erczBjUuVt230zEhrFTE8SO8mCcwXJallpLWQaxR5ufx9lcY7YyU6qVvixBckmRYX6 XAu8fX/H93jFR4X03kvAw+O5CSuaWgQBMSfTrRes= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109334] tree-object-size: Improve size computation in arguments Date: Sun, 29 Oct 2023 06:48:17 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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=3D109334 --- Comment #3 from CVS Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:d96757842a13cad3500b74a352ab34d27a8be622 commit r14-4993-gd96757842a13cad3500b74a352ab34d27a8be622 Author: Martin Uecker Date: Wed Oct 25 23:24:34 2023 +0200 tree-optimization/109334: Improve computation for access attribute The fix for PR104970 restricted size computations to the case where the access attribute was specified explicitly (no VLA). It also restricted it to void pointers or elements with constant sizes. The second restriction is enough to fix the original bug. Revert the first change to again allow size computations for VLA parameters and for VLA parameters together with an explicit access attribute. gcc/ChangeLog: PR tree-optimization/109334 * tree-object-size.cc (parm_object_size): Allow size computation for implicit access attributes. gcc/testsuite/ChangeLog: PR tree-optimization/109334 * gcc.dg/builtin-dynamic-object-size-0.c (test_parmsz_simple3): Supported again. (test_parmsz_external4): New test. * gcc.dg/builtin-dynamic-object-size-20.c: New test. * gcc.dg/pr104970.c: New test.=