analyzer: Fix PR analyzer/101980
[official-gcc.git] / gcc / testsuite / gcc.dg / analyzer / malloc-ipa-6.c
blob62f8b55c3643bbd2fd42ab11ad2262ce431e445f
1 #include <stdlib.h>
3 void *
4 calls_malloc (void)
6 void *result = malloc (1024); /* { dg-message "allocated here" } */
7 return result; /* { dg-warning "leak of 'result'" } */
10 void test_1 ()
12 calls_malloc (); /* { dg-message "calling 'calls_malloc' from 'test_1'" } */
15 static void callee (int i)
19 void test_2 (int i)
21 callee (i);