https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105784
--- Comment #1 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:3a32fb2eaa761aac13ffe5424748d5839038ef66 commit r13-4398-g3a32fb2eaa761aac13ffe5424748d5839038ef66 Author: David Malcolm <dmalc...@redhat.com> Date: Tue Nov 29 19:56:27 2022 -0500 analyzer: fix folding of '(PTR + 0) => PTR' [PR105784] gcc/analyzer/ChangeLog: PR analyzer/105784 * region-model-manager.cc (region_model_manager::maybe_fold_binop): For POINTER_PLUS_EXPR, PLUS_EXPR and MINUS_EXPR, eliminate requirement that the final type matches that of arg0 in favor of a cast. gcc/testsuite/ChangeLog: PR analyzer/105784 * gcc.dg/analyzer/torture/fold-ptr-arith-pr105784.c: New test. Signed-off-by: David Malcolm <dmalc...@redhat.com>