[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / pr59437.C
blob0e77ccde46ea70af37d641306856502a0a3585df
1 // { dg-do compile }
2 // { dg-options "-fsanitize=null -fvtable-verify=std" }
3 // { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
5 template < typename T > struct A
7   T foo ();
8 };
9 template < typename T > struct C: virtual public A < T >
11   C & operator<< (C & (C &));
13 template < typename T >
14 C < T > &endl (C < int > &c)
16   c.foo ();
17   return c;
19 C < int > cout;
20 void
21 fn ()
23   cout << endl;