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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR middle-end/29965
2
// Test that OpenMP construct bodies which never return don't cause ICEs.
3
// { dg-do compile }
4
// { dg-options "-O2 -fopenmp" }
5
 
6
extern void baz () __attribute__ ((noreturn));
7
 
8
void
9
foo1 ()
10
{
11
#pragma omp sections
12
  {
13
    for (;;)
14
      ;
15
  }
16
}
17
 
18
void
19
bar1 ()
20
{
21
#pragma omp sections
22
  {
23
#pragma omp section
24
    baz ();
25
#pragma omp section
26
    baz ();
27
  }
28
}
29
 
30
void
31
foo2 ()
32
{
33
#pragma omp sections
34
  {
35
    ;
36
#pragma omp section
37
    for (;;)
38
      ;
39
  }
40
}
41
 
42
void
43
bar2 ()
44
{
45
#pragma omp sections
46
  {
47
#pragma omp section
48
    baz ();
49
#pragma omp section
50
    ;
51
  }
52
}
53
 
54
void
55
foo3 ()
56
{
57
#pragma omp parallel sections
58
  {
59
    for (;;)
60
      ;
61
  }
62
}
63
 
64
void
65
bar3 ()
66
{
67
#pragma omp parallel sections
68
  {
69
#pragma omp section
70
    baz ();
71
#pragma omp section
72
    baz ();
73
  }
74
}
75
 
76
void
77
foo4 ()
78
{
79
#pragma omp parallel sections
80
  {
81
    ;
82
#pragma omp section
83
    for (;;)
84
      ;
85
  }
86
}
87
 
88
void
89
bar4 ()
90
{
91
#pragma omp parallel sections
92
  {
93
#pragma omp section
94
    baz ();
95
#pragma omp section
96
    ;
97
  }
98
}

powered by: WebSVN 2.1.0

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