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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
builtin-free.c
blob
55b4111f917505ea6b882f1f0b861e97490fb77c
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
4
void
bar
(
void
*);
5
void
foo
(
unsigned
n
)
6
{
7
void
*
p
=
__builtin_malloc
(
n
);
8
if
(
p
)
9
{
10
bar
(
p
);
11
__builtin_free
(
p
);
12
p
=
0
;
13
}
14
__builtin_free
(
p
);
15
}
16
17
/* We should remove the redundant call to free. */
18
19
/* { dg-final { scan-tree-dump-times "free" 1 "optimized" } } */