aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorMartin Uecker <uecker@tugraz.at>2023-10-25 23:24:34 +0200
committerMartin Uecker <uecker@tugraz.at>2023-10-29 07:47:36 +0100
commitd96757842a13cad3500b74a352ab34d27a8be622 (patch)
treea54506a6b12dfcc243240b58b5cfd4e883e28d5b /gcc/d/expr.cc
parentcc7aca846ae524f36a350cd54cd31da22acd6805 (diff)
downloadgcc-d96757842a13cad3500b74a352ab34d27a8be622.zip
gcc-d96757842a13cad3500b74a352ab34d27a8be622.tar.gz
gcc-d96757842a13cad3500b74a352ab34d27a8be622.tar.bz2
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.
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions