aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/cpplib.h
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@gotplt.org>2025-06-26 17:46:00 -0400
committerSiddhesh Poyarekar <siddhesh@gotplt.org>2025-07-03 07:19:02 -0400
commit72e85d46472716e670cbe6e967109473b8d12d38 (patch)
treec00964a0057fd0135b9a3715589ab8180fb2578d /libcpp/include/cpplib.h
parent349da53f13de274864d01b6ccc466961c472dbe1 (diff)
downloadgcc-72e85d46472716e670cbe6e967109473b8d12d38.zip
gcc-72e85d46472716e670cbe6e967109473b8d12d38.tar.gz
gcc-72e85d46472716e670cbe6e967109473b8d12d38.tar.bz2
tree-optimization/120780: Support object size for containing objects
MEM_REF cast of a subobject to its containing object has negative offsets, which objsz sees as an invalid access. Support this use case by peeking into the structure to validate that the containing object indeed contains a type of the subobject at that offset and if present, adjust the wholesize for the object to allow the negative offset. gcc/ChangeLog: PR tree-optimization/120780 * tree-object-size.cc (inner_at_offset, get_wholesize_for_memref): New functions. (addr_object_size): Call get_wholesize_for_memref. gcc/testsuite/ChangeLog: PR tree-optimization/120780 * gcc.dg/builtin-dynamic-object-size-pr120780.c: New test case. Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
Diffstat (limited to 'libcpp/include/cpplib.h')
0 files changed, 0 insertions, 0 deletions