blob: b347449706100a6310df8c03672d667ffb970b57 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +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}