Hi, This is the 6th version of the patch set to extend "counted_by" attribute to pointer fields of structures.
The C FE parts (patch #1 and #3) of the 5th version have been approved by Joseph already (with a minor typo fix, which is included in this new version); The middle end part (patch #2) of the 5th version was reviewed by Sid, he raised several comments and suggestions; compared to the 5th version: https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686879.html https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686882.html https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686880.html https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686881.html The major change are updates per Joseph's and Sid's comments: 1. Fix a typo in doc per Joseph's suggestion; (patch #1) 2. Add a comment in tree-object-size.cc to explain the new added code; 3. Update the testing cases per Sid's suggestions: A. Update pointer-counted-by-4.c; Add pointer-counted-by-4-char.c pointer-counted-by-4-float.c pointer-counted-by-4-struct.c pointer-counted-by-4-union.c B. Update testing cases to resolve the memory leak issue. The whole patch set has been rebased on the latest trunk, bootstrapped and regression tested on both aarch64 and x86. Okay for trunk? Thanks a lot. Qing