From ecfec8c9af9320eb699e960dd3519f440866a1a0 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 24 Jun 2020 17:00:41 -0400 Subject: [PATCH 250/315] FIXME: fix various false leaks reports from compound-assignment-1.c, by looking through casts --- gcc/analyzer/reachable.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/analyzer/reachable.cc b/gcc/analyzer/reachable.cc index f325b4392b1..fe3a04f795c 100644 --- a/gcc/analyzer/reachable.cc +++ b/gcc/analyzer/reachable.cc @@ -160,6 +160,8 @@ reachable_region2s::handle_sval (const svalue2 *sval) } add (pointee, ptr_is_mutable); } + if (const svalue2 *cast = sval->maybe_undo_cast ()) + handle_sval (cast); } /* Add SVAL. If it is a pointer, add the pointed-to region. -- 2.26.2