xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/_Bool-conversion.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386 -emit-llvm -O2 -o - %s | FileCheck %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // CHECK-LABEL: define i32 @f0()
4*f4a2713aSLionel Sambuc // CHECK:  ret i32 1
5*f4a2713aSLionel Sambuc // CHECK: }
6*f4a2713aSLionel Sambuc 
f0_0(void * a0)7*f4a2713aSLionel Sambuc static _Bool f0_0(void *a0) { return (_Bool) a0; }
f0()8*f4a2713aSLionel Sambuc int f0() { return f0_0((void*) 0x2); }
9*f4a2713aSLionel Sambuc 
f1(void)10*f4a2713aSLionel Sambuc _Bool f1(void) {
11*f4a2713aSLionel Sambuc   return (_Bool) ({ void (*x)(); x = 0; });
12*f4a2713aSLionel Sambuc }
13