blob: e0fcc803918880bb549acec0012917901bdf962d [file] [log] [blame]
Daniel Dunbar0d7b0912009-02-03 21:54:49 +00001// RUN: clang -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}