Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / opt / static3.C
blob4f8f7a9ba682f401930f11f46404fb19d8ecb6ba
1 // { dg-do link }
2 // { dg-options "-O2" }
4 class Foo {
5 public:
6   // No out-of-class definition is provided for these class members.
7   // That's technically a violation of the standard, but no diagnostic
8   // is required, and, as a QOI issue, we should optimize away all
9   // references.
10   static const int erf = 0;
11   static const int foo = 1;
14 int one()
16   return Foo::foo;
19 int two()
21   return Foo::foo + Foo::erf;
24 int three(int x)
26   return x ? Foo::erf : Foo::foo;
29 int i;
31 int main ()
33   one ();
34   two ();
35   three (i);