summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/pr29965-1.c
blob: b587d81e7603a7fb43a5718fe521c89057be19f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* PR middle-end/29965 */
/* Test that OpenMP construct bodies which never return don't cause ICEs.  */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp" } */

extern void baz (void) __attribute__ ((noreturn));

static inline void
foo (void)
{
#pragma omp parallel
  for (;;)
    ;
}

static inline void
bar (void)
{
#pragma omp parallel
  baz ();
}

void
foo1 (void)
{
  foo ();
}

void
foo2 (void)
{
  foo ();
}

void
bar1 (void)
{
  bar ();
}

void
bar2 (void)
{
  bar ();
}