OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr34099.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
 
3
#include 
4
 
5
typedef std::complex NumType;
6
 
7
void
8
multiply(NumType a, NumType b, unsigned ac, NumType &ab)
9
{
10
  NumType s;
11
  for (unsigned j=0; 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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.