blob: c12cf82ba0ccec81563f55af5f12822ad1bdf377 [file] [log] [blame]
Daniel Dunbar8a90ac02009-11-29 09:33:10 +00001// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t
Daniel Dunbar16f23572008-07-25 01:11:38 +00002// RUN: grep "ret i32 %" %t
3
4// Make sure return is not constant (if empty range is skipped or miscompiled)
5
6int 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}