https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113333
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>: https://gcc.gnu.org/g:132eb1a210bc7806c4cf188ecac6c08339c94384 commit r13-8752-g132eb1a210bc7806c4cf188ecac6c08339c94384 Author: David Malcolm <dmalc...@redhat.com> Date: Thu May 9 13:09:29 2024 -0400 analyzer: casting all zeroes should give all zeroes [PR113333] In particular, accessing the result of *calloc (1, SZ) (if non-NULL) should be known to be all zeroes. (backported from commit r14-7265-gd235bf2e807c5f) gcc/analyzer/ChangeLog: PR analyzer/113333 * region-model-manager.cc (region_model_manager::maybe_fold_unaryop): Casting all zeroes should give all zeroes. gcc/testsuite/ChangeLog: PR analyzer/113333 * gcc.dg/analyzer/calloc-1.c: Add tests. * gcc.dg/analyzer/data-model-9.c: Update expected results. * gcc.dg/analyzer/pr96639.c: Update expected results. Signed-off-by: David Malcolm <dmalc...@redhat.com>