Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wduplicated-branches8.C
blobf03c92a2c8b37f0050ca3a51e27114953c397a60
1 // PR c++/117880
2 // { dg-do compile }
3 // { dg-options "-Wduplicated-branches" }
5 struct X {};
7 template<typename>
8 struct S {
9   void g1 () { false ? void() : void(); }   // { dg-warning "this condition has identical branches" }
10   void g2 () { false ? int() : int(); }     // { dg-warning "this condition has identical branches" }
11   void g3 () { int() ? : int(); }           // { dg-warning "this condition has identical branches" }
12   void g4 () { false ? int() : double(); }
13   void g5 () { false ? unsigned() : int(); }
14   void g6 () { false ? signed() : int(); }  // { dg-warning "this condition has identical branches" }
15   // Two different TARGET_EXPRs.
16   void g7 () { false ? X() : X(); }