re PR tree-optimization/33593 (tree-outof-ssa moves sources of non-call exceptions...
[gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr22550.C
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 class X {
5 public:
6 int mfunc1 () {
7 return 1;
8 }
9 int mfunc2 () {
10 return 2;
11 }
12 X (int a, int b) { }
13 };
14
15 typedef int (X::*memfunc_p_t) ();
16
17 memfunc_p_t mf_arr[2] = { &X::mfunc1, &X::mfunc2 };
18
19 int
20 main ()
21 {
22 // Get pntr to the array of pointers to member-funcs
23 memfunc_p_t (*mf_arr_p)[2] = &mf_arr;
24 // Compare indirect against direct access to an array element
25 if ((*mf_arr_p)[0] != mf_arr[0])
26 return 1;
27 return 0;
28 }