1// RUN: %clang_cc1 -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s 2struct A {}; 3struct B : A {}; 4extern "C" { 5extern int B::*a; 6void test1() { (int A::*)(a); } 7} 8// CHECK-LABEL: define void @test1( 9// CHECK: %[[load:.*]] = load i32, i32* @a 10// CHECK: %[[memptr_cmp:.*]] = icmp ne i32 %[[load]], -1 11// CHECK: br i1 %[[memptr_cmp]] 12 13// CHECK: %[[adj:.*]] = sub nsw i32 %[[load]], 0 14// CHECK: %[[nv_adj:.*]] = select i1 true, i32 %[[adj]], i32 0 15 16// CHECK: %[[memptr_converted:.*]] = phi i32 [ -1, {{.*}} ], [ %[[nv_adj]], {{.*}} ] 17