diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/Wduplicated-branches-13.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/Wduplicated-branches-13.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/Wduplicated-branches-13.c b/gcc/testsuite/c-c++-common/Wduplicated-branches-13.c new file mode 100644 index 0000000..7aa5b37 --- /dev/null +++ b/gcc/testsuite/c-c++-common/Wduplicated-branches-13.c @@ -0,0 +1,23 @@ +/* PR c/79199 */ +/* { dg-do compile } */ +/* { dg-options "-Wduplicated-branches" } */ + +unsigned int a, b, c, d, e; +void +fn1 (void) +{ + if (0) /* { dg-warning "this condition has identical branches" } */ + { + if (d > 4294967293) + (void) 5; + c = d; + b = e | a; + } + else + { + if (d > 4294967293) + (void) 5; + c = d; + b = e | a; + } +} |