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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
extern int test(int);
4
void foo()
5
{
6
  int i;
7
 
8
  for (i = 0; i < 10; ++i)
9
    {
10
      #pragma omp sections
11
      {
12
        continue;               // { dg-error "invalid exit" }
13
      }
14
    }
15
 
16
  #pragma omp sections
17
    {
18
    #pragma omp section
19
      { bad1: ; }               // { dg-error "jump to label" }
20
    #pragma omp section
21
      goto bad1;                // { dg-error "from here|enters OpenMP" }
22
    }
23
 
24
  #pragma omp sections
25
    {
26
      goto bad2;                // { dg-error "from here" }
27
    }
28
  bad2:;                        // { dg-error "jump|exits OpenMP" }
29
 
30
  goto bad3;                    // { dg-error "from here" }
31
  #pragma omp sections
32
    {
33
      bad3: ;                   // { dg-error "jump|enters OpenMP" }
34
    }
35
 
36
  #pragma omp sections
37
    {
38
      goto ok1;
39
      ok1:;
40
 
41
    #pragma omp section
42
      for (i = 0; i < 10; ++i)
43
        if (test(i))
44
          break;
45
        else
46
          continue;
47
 
48
    #pragma omp section
49
      switch (i)
50
        {
51
        case 0:
52
          break;
53
        default:
54
          test(i);
55
        }
56
    }
57
}
58
 
59
// { dg-message "error: invalid branch to/from an OpenMP structured block" "" { target *-*-* } 21 }
60
// { dg-message "error: invalid branch to/from an OpenMP structured block" "" { target *-*-* } 26 }
61
// { dg-message "error: invalid entry to OpenMP structured block" "" { target *-*-* } 30 }

powered by: WebSVN 2.1.0

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