summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/pr35144.C
blob: f0bb7bb6363b68534639d7612222d2ea267d3d0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// PR c++/35144
// { dg-do compile }
// { dg-options "-O2" }

struct A
{
  int baz ();
};

typedef int (A::*P) ();

struct B
{
  B ();
  int foo (P x, int y = 0);
};

struct C
{
  typedef int (B::*Q) (P, int);
  void bar (Q x) { c = x; }
  Q c;
};

extern C c;

B::B ()
{
 c.bar ((C::Q) &B::foo);
}