https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112790
--- 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:994477c41049d45b60a4d6db7f624fe5c89860fe commit r13-8751-g994477c41049d45b60a4d6db7f624fe5c89860fe Author: David Malcolm <dmalc...@redhat.com> Date: Thu May 9 13:09:29 2024 -0400 analyzer: fix deref-before-check false positives due to inlining [PR112790] Backported from commit r14-6918-g5743e1899d5964 (moving testcase from c-c++-common to gcc.dg). gcc/analyzer/ChangeLog: PR analyzer/112790 * checker-event.cc (class inlining_info): Move to... * inlining-iterator.h (class inlining_info): ...here. * sm-malloc.cc: Include "analyzer/inlining-iterator.h". (maybe_complain_about_deref_before_check): Reject stmts that were inlined from another function. gcc/testsuite/ChangeLog: PR analyzer/112790 * gcc.dg/analyzer/deref-before-check-pr112790.c: New test. Signed-off-by: David Malcolm <dmalc...@redhat.com>