repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr34099.C
blob
49fa9cac1ebc1d5454028208ef8977ff6f6526c5
1
/* { dg-do run } */
2
3
#include <complex>
4
5
typedef std::complex<double> NumType;
6
7
void
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);
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