repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
analyzer: Fix PR analyzer/101980
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
analyzer
/
malloc-ipa-6.c
blob
62f8b55c3643bbd2fd42ab11ad2262ce431e445f
1
#include <stdlib.h>
2
3
void
*
4
calls_malloc
(
void
)
5
{
6
void
*
result
=
malloc
(
1024
);
/* { dg-message "allocated here" } */
7
return
result
;
/* { dg-warning "leak of 'result'" } */
8
}
9
10
void
test_1
()
11
{
12
calls_malloc
();
/* { dg-message "calling 'calls_malloc' from 'test_1'" } */
13
}
14
15
static void
callee
(
int
i
)
16
{
17
}
18
19
void
test_2
(
int
i
)
20
{
21
callee
(
i
);
22
}