Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/calloc-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 void*f(){
5 char*p=__builtin_malloc(42);
6 __builtin_memset(p,0,42);
7 __builtin_memset(p,0,42);
8 return p;
9 };
10
11 /* { dg-final { scan-tree-dump-not "malloc" "optimized" } } */
12 /* { dg-final { scan-tree-dump-times "calloc" 1 "optimized" } } */
13 /* { dg-final { scan-tree-dump-not "memset" "optimized" } } */