blob: eab32c1025186f38eddfa3b6891ae537c1e4fdb1 [file] [log] [blame]
Shih-wei Liaof8fd82b2010-02-10 11:10:31 -08001// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6'
2// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 7'
3
4static enum { foo, bar = 1U } z;
5
6int main (void)
7{
8 int r = 0;
9
10 if (bar - 2 < 0)
11 r += 4;
12 if (foo - 1 < 0)
13 r += 2;
14 if (z - 1 < 0)
15 r++;
16
17 return r;
18}
19