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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c++/] [loop-7.C] - Rev 837

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

// PR c++/24502
// { dg-do run }

extern "C" void abort ();

template <typename T> T
foo (T r)
{
  T i;
#pragma omp for
  for (i = 0; i < 10; i++)
    r += i;
  return r;
}

int
main ()
{
  if (foo (0) != 10 * 9 / 2 || foo (2L) != 10L * 9 / 2 + 2)
    abort ();
  return 0;
}

Go to most recent revision | 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.