PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / pr29965-4.c
blob7416d8ec6752dd034c18f0cbf691ae804a11c57a
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" } */
6 extern void baz (void) __attribute__ ((noreturn));
8 void
9 foo1 (void)
11 int i;
12 #pragma omp for schedule (dynamic)
13 for (i = 0; i < 2834; i++)
14 for (;;)
18 void
19 bar1 (void)
21 int i;
22 #pragma omp for schedule (dynamic)
23 for (i = 0; i < 2834; i++)
24 baz ();
27 void
28 foo2 (void)
30 int i;
31 #pragma omp parallel for schedule (dynamic)
32 for (i = 0; i < 2834; i++)
33 for (;;)
37 void
38 bar2 (void)
40 int i;
41 #pragma omp parallel for schedule (dynamic)
42 for (i = 0; i < 2834; i++)
43 baz ();