Daniel Dunbar | 0d7b091 | 2009-02-03 21:54:49 +0000 | [diff] [blame] | 1 | // RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t && |
Daniel Dunbar | 16f2357 | 2008-07-25 01:11:38 +0000 | [diff] [blame] | 2 | // RUN: grep "ret i32 %" %t |
3 | |||||
4 | // Make sure return is not constant (if empty range is skipped or miscompiled) | ||||
5 | |||||
6 | int f0(unsigned x) { | ||||
7 | switch(x) { | ||||
8 | case 2: | ||||
9 | // fallthrough empty range | ||||
10 | case 10 ... 9: | ||||
11 | return 10; | ||||
12 | default: | ||||
13 | return 0; | ||||
14 | } | ||||
15 | } |