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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c/] [loop-9.c] - Blame information for rev 810

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

Line No. Rev Author Line
1 735 jeremybenn
extern void abort (void);
2
 
3
char buf[8] = "01234567";
4
char buf2[8] = "23456789";
5
 
6
int
7
main (void)
8
{
9
  char *p, *q;
10
  int sum = 0;
11
  #pragma omp parallel for collapse (2) reduction (+:sum) lastprivate (p, q)
12
  for (p = buf; p < &buf[8]; p++)
13
    for (q = &buf2[0]; q <= buf2 + 7; q++)
14
      sum += (*p - '0') + (*q - '0');
15
  if (p != &buf[8] || q != buf2 + 8 || sum != 576)
16
    abort ();
17
  return 0;
18
}

powered by: WebSVN 2.1.0

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