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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [block-2.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
void foo()
4
{
5
  int i, j;
6
 
7
  #pragma omp for
8
  for (i = 0; i < 10; ++i)
9
    break;                      // { dg-error "break" }
10
 
11
  bad1:                         // { dg-error "jump to label" }
12
  #pragma omp for
13
  for (i = 0; i < 10; ++i)
14
    goto bad1;                  // { dg-error "from here|exits OpenMP" }
15
 
16
  goto bad2;                    // { dg-error "from here" }
17
  #pragma omp for
18
  for (i = 0; i < 10; ++i)
19
    {
20
      bad2: ;                   // { dg-error "jump|enters OpenMP" }
21
    }
22
 
23
  #pragma omp for
24
  for (i = 0; i < 10; ++i)
25
    for (j = 0; j < 10; ++j)
26
      if (i == j)
27
        break;
28
 
29
  #pragma omp for
30
  for (i = 0; i < 10; ++i)
31
    continue;
32
}
33
 
34
// { dg-message "error: invalid branch to/from an OpenMP structured block" "" { target *-*-* } 14 }
35
// { dg-message "error: invalid entry to OpenMP structured block" "" { target *-*-* } 16 }

powered by: WebSVN 2.1.0

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