blob: 007a0c7587f0d3689b046c086c72537fdbfd581a [file] [log] [blame]
Daniel Dunbar16f23572008-07-25 01:11:38 +00001// RUN: clang --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t &&
2// 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}