Debian Codegraph @

gcc/testsuite/g++.dg/ext/attribute-may-alias-1.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>& () { return *static_cast< Y<X>* >(this); }
10 };
11
12 int main()
13 {
14 &X::operator Y<X>&;
15 }