https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102225
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>: https://gcc.gnu.org/g:e66b9f6779f46433b0e2c093b58403604ed131cc commit r12-3422-ge66b9f6779f46433b0e2c093b58403604ed131cc Author: David Malcolm <dmalc...@redhat.com> Date: Wed Sep 8 14:37:19 2021 -0400 analyzer: fix ICE when discarding result of realloc [PR102225] gcc/analyzer/ChangeLog: PR analyzer/102225 * analyzer.h (compat_types_p): New decl. * constraint-manager.cc (constraint_manager::get_or_add_equiv_class): Guard against NULL type when checking for pointer types. * region-model-impl-calls.cc (region_model::impl_call_realloc): Guard against NULL lhs type/region. Guard against the size value not being of a compatible type for dynamic extents. * region-model.cc (compat_types_p): Make non-static. gcc/testsuite/ChangeLog: PR analyzer/102225 * gcc.dg/analyzer/realloc-1.c (test_10): New. * gcc.dg/analyzer/torture/pr102225.c: New test.