1 /* { dg-do run } */
2 
3 #include <complex>
4 
5 typedef std::complex<double> NumType;
6 
7 void
multiply(NumType a,NumType b,unsigned ac,NumType & ab)8 multiply(NumType a, NumType b, unsigned ac, NumType &ab)
9 {
10   NumType s;
11   for (unsigned j=0; j<ac; j++)
12     s = a * b;
13   ab = s;
14 }
15 extern "C" void abort (void);
main()16 int main()
17 {
18   NumType a(1,2), b(3,-2), c;
19   multiply(a, b, 1, c);
20   if (c.real() != 7
21       || c.imag() != 4)
22     abort ();
23   return 0;
24 }
25 
26