Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wduplicated-cond4.C

raw
1 // PR c++/107593
2 // { dg-do compile }
3 // { dg-options "-Wduplicated-cond" }
4
5 int n;
6
7 template<class T> bool g() { n = 42; return false; }
8
9 template<class T>
10 void f() {
11 if (n)
12 ;
13 else if (g<T>())
14 ;
15 else if (n)
16 ;
17 }