gcc/testsuite/g++.dg/warn/Wduplicated-branches3.C
raw| 1 | // PR c++/79672 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-Wduplicated-branches -fopenmp" } |
| 4 | // { dg-require-effective-target fopenmp } |
| 5 | |
| 6 | template<int N> void foo() |
| 7 | { |
| 8 | if (N > 0) |
| 9 | { |
| 10 | #pragma omp parallel for |
| 11 | for (int i = 0; i < 10; ++i) ; |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | void bar() |
| 16 | { |
| 17 | foo<0>(); |
| 18 | } |