aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/ssa-store-ccp-1.C
blob: 06e9b1e35f639fd67bc6a9239e8f133a3b2446a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

class bar
{
public:
  static const int conststaticvariable;
};


int f(void)
{
  return bar::conststaticvariable;
}

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