aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-sccvn-3.c
blob: fb266bb5417c783b6b0e9b4594f322dd8b0985d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-fre1-stats" } */
int main(int argc, char **argv)
{
  int *p;
  int result;
  *p = 2;
  if (argc)
    *p = 2;
  result = *p;
  return result;
}
/* We should eliminate result = *p by saying it has the value 2.  */
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre1"} } */
/* { dg-final { cleanup-tree-dump "fre1" } } */