PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/gcc/testsuite/gcc.dg/gomp/pr29965-4.c

https://gitlab.com/sortix/gcc
C | 44 lines | 35 code | 5 blank | 4 comment | 10 complexity | 8e42dd5f80e8bc2ea521bfc0f4632d64 MD5 | raw file
 1/* 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
 6extern void baz (void) __attribute__ ((noreturn));
 7
 8void
 9foo1 (void)
10{
11  int i;
12#pragma omp for schedule (dynamic)
13  for (i = 0; i < 2834; i++)
14    for (;;)
15      ;
16}
17
18void
19bar1 (void)
20{
21  int i;
22#pragma omp for schedule (dynamic)
23  for (i = 0; i < 2834; i++)
24    baz ();
25}
26
27void
28foo2 (void)
29{
30  int i;
31#pragma omp parallel for schedule (dynamic)
32  for (i = 0; i < 2834; i++)
33    for (;;)
34      ;
35}
36
37void
38bar2 (void)
39{
40  int i;
41#pragma omp parallel for schedule (dynamic)
42  for (i = 0; i < 2834; i++)
43    baz ();
44}