[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / gomp / pr29965-9.C
blobb66a2472928013d15ed5060910baec86ad2599cd
1 // PR middle-end/29965
2 // Test that OpenMP construct bodies which never return don't cause ICEs.
3 // This is invalid code, but we don't emit diagnostics for it, nevertheless
4 // we test that we don't ICE on it.
5 // { dg-do compile }
6 // { dg-options "-O2 -fopenmp" }
8 void
9 foo1 ()
11 #pragma omp single
12   throw 0;
15 void
16 foo2 ()
18 #pragma omp master
19   throw 0;
22 void
23 foo3 ()
25 #pragma omp ordered
26   throw 0;
29 void
30 foo4 ()
32 #pragma omp critical
33   throw 0;