Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/Wswitch-unreachable-4.c @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 | |
3 void | |
4 foo (int a, int b) | |
5 { | |
6 switch (a) | |
7 { | |
8 { int c; } | |
9 { int d; } | |
10 { int e; } | |
11 b++; /* { dg-warning "statement will never be executed" } */ | |
12 case 1: | |
13 break; | |
14 } | |
15 | |
16 switch (a) | |
17 { | |
18 { int c; } | |
19 { int d = 1; } /* { dg-warning "statement will never be executed" } */ | |
20 { int e; } | |
21 b++; | |
22 case 1: | |
23 break; | |
24 } | |
25 } |