blob: 522c35fb003165da19a4f2063d49d9560f19962e [file] [log] [blame]
// Test for undesired aliasing.
struct A {
const A * get_this () const { return this; }
};
main ()
{
A a;
int r = 0;
const A& ar1 = (A)a;
if (&ar1 == &a)
r |= 1;
if (A(a).get_this () == &a)
r |= 2;
return r;
}