Debian Codegraph @

gcc/testsuite/g++.dg/init/pmf1.C

raw
1 // PR c++/14089
2 // { dg-do compile }
3 //
4 // C++ front end generated assignment between types that were not
5 // compatible in any sense visible to the optimizers.
6
7 struct pair {
8 typedef void (pair::*fp)();
9 int first;
10 pair::fp second;
11 pair(const int& a, const pair::fp& b) : first(a), second(b) {}
12 void f(const int& a, const pair::fp& b) { first = a; second = b; }
13 };
14
15 void op() {
16 pair(5, pair::fp());
17 }