summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p6611.C
blob: 9a2a28ed174be5ac5b9e4f81cdd3a393c592e025 (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
// { dg-do run  }
// prms-id: 6611

class COMPLEX {
public:
  COMPLEX(double a, double b=0) { re = a; im = b; }
  void print() const { }
private:
  double re;
  double im;
};

int main(void)
{
  COMPLEX a[3][3] = {
    { 1, COMPLEX(2,3), COMPLEX(3,4), },
    { 1, COMPLEX(2,3), COMPLEX(3,4), },
    { 1, COMPLEX(2,3), COMPLEX(3,4), },
  };
  int i,j;

  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      a[i][j].print();
    }
  }
}