https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109334
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Uecker <uec...@gcc.gnu.org>: https://gcc.gnu.org/g:d96757842a13cad3500b74a352ab34d27a8be622 commit r14-4993-gd96757842a13cad3500b74a352ab34d27a8be622 Author: Martin Uecker <uec...@tugraz.at> 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.