OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr34099.C] - Rev 384

Compare with Previous | Blame | View Log

/* { dg-do run } */

#include <complex>

typedef std::complex<double> NumType;

void
multiply(NumType a, NumType b, unsigned ac, NumType &ab)
{
  NumType s;
  for (unsigned j=0; j<ac; j++)
    s = a * b;
  ab = s;
}
extern "C" void abort (void);
int main()
{
  NumType a(1,2), b(3,-2), c;
  multiply(a, b, 1, c);
  if (c.real() != 7
      || c.imag() != 4)
    abort ();
  return 0;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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