summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr62112-1.c
blob: 8334bd4678759b738e1354e8d81a04c8ecae87b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-dse1-details" } */

void f(){
  char*p=__builtin_malloc(42);
  __builtin_memset(p,3,10);
  __builtin_memset(p,7,33);
}
char*g;
void h(){
  char*p=__builtin_malloc(42);
  g=__builtin_memset(p,3,10);
  __builtin_free(p);
}
char*i(){
  char*p=__builtin_malloc(42);
  __builtin_memset(p,3,10);
  __builtin_memset(p,7,33);
  return p;
}

/* { dg-final { scan-tree-dump-times "Deleted dead call" 4 "dse1" } } */