[31/77] Use scalar_int_mode for move2add
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / p2394.C
blob6581f9f2f88c02a31fe4f26ae0bdc7bbb1f80db7
1 // { dg-do run  }
2 // prms-id: 2394
4 class Foo {
5  public:
6   int x;
7   int y;
8   Foo(int i, int j) { x = i; y = j; }
9 } foo(10, 11);
11 class Wasted { int unsed; };
13 class Bar : Wasted, public Foo {
14 public:
15   Bar() : Foo(12, 13) { }
16 } bar;
18 int
19 test0() {
20   int Foo::* pmi = &Foo::y;
21   return (int)(foo.*pmi);
24 int
25 test1() {
26   int Foo::* pmi = &Foo::y;
27   return (int)(bar.*pmi);
30 int
31 main() {
32   if (test0() != 11)
33     return 1;
34   if (test1() != 13)
35     return 2;
36   return 0;