Fix all tests that fail with -sanitize=return.
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr35144.C
blobf0bb7bb6363b68534639d7612222d2ea267d3d0e
1 // PR c++/35144
2 // { dg-do compile }
3 // { dg-options "-O2" }
5 struct A
7   int baz ();
8 };
10 typedef int (A::*P) ();
12 struct B
14   B ();
15   int foo (P x, int y = 0);
18 struct C
20   typedef int (B::*Q) (P, int);
21   void bar (Q x) { c = x; }
22   Q c;
25 extern C c;
27 B::B ()
29  c.bar ((C::Q) &B::foo);