1*532dc62bSNikita Popov// RUN: %clang_cc1 -no-opaque-pointers -O0 -cl-std=CL2.0 -emit-llvm %s -o - | FileCheck %s 21ea58437SAaron Ballmanextern queue_t get_default_queue(void); 389831421SEgor Churaev 41ea58437SAaron Ballmanbool compare(void) { 589831421SEgor Churaev return 0 == get_default_queue() && 689831421SEgor Churaev get_default_queue() == 0; 789831421SEgor Churaev // CHECK: icmp eq %opencl.queue_t* null, %{{.*}} 889831421SEgor Churaev // CHECK: icmp eq %opencl.queue_t* %{{.*}}, null 989831421SEgor Churaev} 1089831421SEgor Churaev 1189831421SEgor Churaevvoid func(queue_t q); 1289831421SEgor Churaev 131ea58437SAaron Ballmanvoid init(void) { 1489831421SEgor Churaev queue_t q = 0; 1589831421SEgor Churaev func(0); 1689831421SEgor Churaev // CHECK: store %opencl.queue_t* null, %opencl.queue_t** %q 1789831421SEgor Churaev // CHECK: call void @func(%opencl.queue_t* null) 1889831421SEgor Churaev} 19