Better handle MIN/MAX_EXPR of unrelated objects [PR102200].
Resolves: PR middle-end/102200 - ICE on a min of a decl and pointer in a loop gcc/ChangeLog: PR middle-end/102200 * pointer-query.cc (access_ref::inform_access): Handle MIN/MAX_EXPR. (handle_min_max_size): Change argument. Store original SSA_NAME for operands to potentially distinct (sub)objects. (compute_objsize_r): Adjust call to the above. gcc/testsuite/ChangeLog: PR middle-end/102200 * gcc.dg/Wstringop-overflow-62.c: Adjust text of an expected note. * gcc.dg/Warray-bounds-89.c: New test. * gcc.dg/Wstringop-overflow-74.c: New test. * gcc.dg/Wstringop-overflow-75.c: New test. * gcc.dg/Wstringop-overflow-76.c: New test.
Showing
- gcc/pointer-query.cc 53 additions, 9 deletionsgcc/pointer-query.cc
- gcc/testsuite/gcc.dg/Warray-bounds-89.c 139 additions, 0 deletionsgcc/testsuite/gcc.dg/Warray-bounds-89.c
- gcc/testsuite/gcc.dg/Wstringop-overflow-62.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/Wstringop-overflow-62.c
- gcc/testsuite/gcc.dg/Wstringop-overflow-74.c 22 additions, 0 deletionsgcc/testsuite/gcc.dg/Wstringop-overflow-74.c
- gcc/testsuite/gcc.dg/Wstringop-overflow-75.c 133 additions, 0 deletionsgcc/testsuite/gcc.dg/Wstringop-overflow-75.c
- gcc/testsuite/gcc.dg/Wstringop-overflow-76.c 148 additions, 0 deletionsgcc/testsuite/gcc.dg/Wstringop-overflow-76.c
Loading
Please register or sign in to comment