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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [collapse-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fopenmp" } */
3
 
4
int i, j, k;
5
extern int foo (void);
6
 
7
void
8
f1 (void)
9
{
10
  #pragma omp for collapse (2)
11
  for (i = 0; i < 5; i++)
12
    ;                                   /* { dg-error "not enough perfectly nested" } */
13
  {
14
    for (j = 0; j < 5; j++)
15
      ;
16
  }
17
}
18
 
19
void
20
f2 (void)
21
{
22
  #pragma omp for collapse (2)
23
  for (i = 0; i < 5; i++)
24
    {
25
      {
26
        {
27
          for (j = 0; j < 5; j++)
28
            {
29
            }
30
        }
31
      }
32
    }
33
}
34
 
35
void
36
f3 (void)
37
{
38
  #pragma omp for collapse (2)
39
  for (i = 0; i < 5; i++)
40
    {
41
      int k = foo ();                   /* { dg-error "not enough perfectly nested" } */
42
      {
43
        {
44
          for (j = 0; j < 5; j++)
45
            {
46
            }
47
        }
48
      }
49
    }
50
}
51
 
52
void
53
f4 (void)
54
{
55
  #pragma omp for collapse (2)
56
  for (i = 0; i < 5; i++)
57
    {
58
      {
59
        for (j = 0; j < 5; j++)
60
          ;
61
        foo ();                         /* { dg-error "collapsed loops not perfectly nested before" } */
62
      }
63
    }
64
}
65
 
66
void
67
f5 (void)
68
{
69
  #pragma omp for collapse (2)
70
  for (i = 0; i < 5; i++)
71
    {
72
      {
73
        for (j = 0; j < 5; j++)
74
          ;
75
      }
76
      foo ();                           /* { dg-error "collapsed loops not perfectly nested before" } */
77
    }
78
}
79
 
80
void
81
f6 (void)
82
{
83
  #pragma omp for collapse (2)
84
  for (i = 0; i < 5; i++)
85
    {
86
      {
87
        for (j = 0; j < 5; j++)
88
          ;
89
      }
90
    }
91
  foo ();
92
}

powered by: WebSVN 2.1.0

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