aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/infinite-recursion.cc
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@gotplt.org>2023-01-26 07:07:03 -0500
committerSiddhesh Poyarekar <siddhesh@gotplt.org>2023-01-26 07:20:53 -0500
commit0573a0778af88e805f7630ac8640ecd67d692665 (patch)
treeb723e9358ec03b916d7619f3d67a267f41901125 /gcc/analyzer/infinite-recursion.cc
parent59a42fe6a99db39f2fed21c2a69faf6fa78ccfd4 (diff)
downloadgcc-0573a0778af88e805f7630ac8640ecd67d692665.zip
gcc-0573a0778af88e805f7630ac8640ecd67d692665.tar.gz
gcc-0573a0778af88e805f7630ac8640ecd67d692665.tar.bz2
tree-optimization/108522 Use component_ref_field_offset
Instead of using TREE_OPERAND (expr, 2) directly, use component_ref_field_offset instead, which does scaling for us. The function also substitutes PLACEHOLDER_EXPRs but it is not relevant for tree-object-size. gcc/ChangeLog: PR tree-optimization/108522 * tree-object-size.cc (compute_object_offset): Make EXPR argument non-const. Call component_ref_field_offset. gcc/testsuite/ChangeLog: PR tree-optimization/108522 * gcc.dg/builtin-dynamic-object-size-0.c (DEFSTRUCT): New macro. (test_dynarray_struct_member_b, test_dynarray_struct_member_c, test_dynarray_struct_member_d, test_dynarray_struct_member_subobj_b, test_dynarray_struct_member_subobj_c, test_dynarray_struct_member_subobj_d): New tests. (main): Call them. Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
Diffstat (limited to 'gcc/analyzer/infinite-recursion.cc')
0 files changed, 0 insertions, 0 deletions