aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/redundant-assign-zero-2.c
blob: 4a5b7804922e4200ea859562ad0ef9328dc74078 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-fre -fdump-tree-dse-details" } */

#include <string.h>

void blahd (double *);

void fubar ()
{
  double d;
  double *x = &d;

  memset (&d, 0 , sizeof d);
  *x = 0.0;
  blahd (x);
}

/* { dg-final { scan-tree-dump-times "Deleted redundant store" 1 "dse1"} } */