summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wunreachable-5.c
blob: 11dc3204da1178b4c93b911d085112abc9c94ab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR c/10175 */

/* { dg-do compile } */
/* { dg-options "-Wunreachable-code" } */

int value;

int main(void)
{
    if (0)
        value = 0;  /* { dg-warning "will never be executed" "" } */
    else
        value = 1;

    return 0;
}