FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / rvalue2.C
blob71f59bc68b31607089044ef790c13ef7a627a4c4
1 // Test for undesired aliasing.
3 struct A {
4   const A * get_this () const { return this; }
5 };
7 int main ()
9   A a;
10   int r = 0;
11   const A& ar1 = (A)a;
12   if (&ar1 == &a)
13     r |= 1;
14   if (A(a).get_this () == &a)
15     r |= 2;
16   return r;