PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / builtin-free.c
blob55b4111f917505ea6b882f1f0b861e97490fb77c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 void bar (void *);
5 void foo(unsigned n)
7 void *p = __builtin_malloc (n);
8 if (p)
10 bar (p);
11 __builtin_free (p);
12 p = 0;
14 __builtin_free (p);
17 /* We should remove the redundant call to free. */
19 /* { dg-final { scan-tree-dump-times "free" 1 "optimized" } } */