Debian Codegraph @

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

raw
1 // PR c++/120940
2 // { dg-do compile }
3 // { dg-options "-Wduplicated-branches" }
4
5 static char a[16][8], b[16][8];
6
7 char *
8 foo (int x, int y)
9 {
10 return (x ? a : b)[y];
11 }