https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118224
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:d882e48d48bf300941c3610c5af157c64ccf0a84 commit r15-7056-gd882e48d48bf300941c3610c5af157c64ccf0a84 Author: Jakub Jelinek <ja...@redhat.com> Date: Mon Jan 20 10:24:18 2025 +0100 tree-ssa-dce: Fix calloc handling [PR118224] As reported by Dimitar, this should have been a multiplication, but wasn't caught because in the test (~(__SIZE_TYPE__) 0) / 2 is the largest accepted size and so adding 3 to it also resulted in "overflow". The following patch adds one subtest to really verify it is a multiplication and fixes the operation. 2025-01-20 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/118224 * tree-ssa-dce.cc (is_removable_allocation_p): Multiply a1 by a2 instead of adding it. * gcc.dg/pr118224.c: New test.