From e9806a42de1d482b19098a26d713162bdf80dcf2 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 25 Jun 2020 09:43:11 -0400 Subject: [PATCH 252/315] FIXME: fix unknown-fns.c: test_4a --- gcc/testsuite/gcc.dg/analyzer/unknown-fns.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c b/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c index 355c8b3d92a..fd1ecbb7005 100644 --- a/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c +++ b/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c @@ -76,10 +76,10 @@ void test_4a (void) node_b.ptr = malloc (sizeof (int)); global_ptr = &node_a; *node_b.ptr = 42; /* { dg-warning "possibly-NULL" "possibly-NULL" } */ - /* { dg-warning "leak" "leak" { target *-*-* } .-1 } */ - /* FIXME: the above leak report is correct, but is reported at the wrong - location. */ -} /* { dg-warning "leak" } */ + /* Although there's a chain of pointers to the allocation, pointed to + by global_ptr, the chain goes through the stack frame and thus + there's a leak when it is popped. */ +} /* { dg-warning "leak of 'node_b.ptr'" } */ /* With a call to an unknown function. */ -- 2.26.2