Debian Codegraph @

gcc/testsuite/g++.dg/ext/attribute-may-alias-2.C

raw
1 // PR c++/53421
2
3 template< class T >
4 struct Y : T
5 { } __attribute__((__may_alias__));
6
7 struct X
8 {
9 operator Y<X>& ();
10 };
11
12 Y<X> y = Y<X>();
13 X::operator Y<X>& () { return *static_cast< Y<X>* >(this); }