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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [block-3.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 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: ; }
20
    #pragma omp section
21
      goto bad1;                // { dg-error "invalid exit" }
22
    }
23
 
24
  #pragma omp sections
25
    {
26
      goto bad2;                // { dg-error "invalid exit" }
27
    }
28
  bad2:;
29
 
30
  goto bad3;                    // { dg-error "invalid entry" }
31
  #pragma omp sections
32
    {
33
      bad3: ;
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
}

powered by: WebSVN 2.1.0

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