Daniel Dunbar | 16f2357 | 2008-07-25 01:11:38 +0000 | [diff] [blame] | 1 | // RUN: clang --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t && |
2 | // RUN: grep "ret i32" %t | count 1 && | ||||
3 | // RUN: grep "ret i32 10" %t | count 1 | ||||
4 | |||||
5 | // Ensure that default after a case range is not ignored. | ||||
6 | |||||
7 | static int f1(unsigned x) { | ||||
8 | switch(x) { | ||||
9 | case 10 ... 0xFFFFFFFF: | ||||
10 | return 0; | ||||
11 | default: | ||||
12 | return 10; | ||||
13 | } | ||||
14 | } | ||||
15 | |||||
16 | int g() { | ||||
17 | return f1(2); | ||||
18 | } |