summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-sccvn-3.c
blob: 9040ff856bcc88983e9eb78c7ce30c95a300f61b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-fre1" } */
int *p;
int main(int argc, char **argv)
{
  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 "return 2;" "fre1"} } */