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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c/] [pr38650.c] - Blame information for rev 735

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 735 jeremybenn
/* PR c++/38650 */
2
/* { dg-do run } */
3
 
4
#include <stdlib.h>
5
 
6
int e;
7
 
8
int
9
main ()
10
{
11
  volatile int i, j = 10;
12
  e = 0;
13
#pragma omp parallel for reduction(+:e)
14
  for (i = 0; i < j; i += 1)
15
    e++;
16
  if (e != 10)
17
    abort ();
18
  e = 0;
19
#pragma omp parallel for reduction(+:e)
20
  for (i = 0; i < j; ++i)
21
    e++;
22
  if (e != 10)
23
    abort ();
24
  e = 0;
25
#pragma omp parallel for reduction(+:e)
26
  for (i = 0; i < j; i++)
27
    e++;
28
  if (e != 10)
29
    abort ();
30
  e = 0;
31
#pragma omp parallel for reduction(+:e)
32
  for (i = 0; i < 10; i += 1)
33
    e++;
34
  if (e != 10)
35
    abort ();
36
  e = 0;
37
#pragma omp parallel for reduction(+:e)
38
  for (i = 0; i < 10; ++i)
39
    e++;
40
  if (e != 10)
41
    abort ();
42
  e = 0;
43
#pragma omp parallel for reduction(+:e)
44
  for (i = 0; i < 10; i++)
45
    e++;
46
  if (e != 10)
47
    abort ();
48
  return 0;
49
}

powered by: WebSVN 2.1.0

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