summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
blob: be37a21d41578242105aebaaf9959d3f02b19b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

const int conststaticvariable;

int f(void)
{
  return conststaticvariable;
}

/* There should be a reference to conststaticvariable since it may
   may be overriden at link time.  */
/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */