blob: 9f322a75ec6cab2bdd718333b48243c4bc070132 [file] [log] [blame]
Anders Carlsson7b699562009-09-29 03:38:56 +00001// RUN: clang-cc %s -emit-llvm -o - -triple=x86_64-apple-darwin9 -O2 | FileCheck %s
2
3struct A { int a; };
4struct B { int b; };
5struct C : B, A { };
6
7void (A::*pa)();
8void (A::*volatile vpa)();
9void (B::*pb)();
10void (C::*pc)();
11
12
13void f() {
14 // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pa, i64 0, i32 0)
15 // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pa, i64 0, i32 1)
16 pa = 0;
17
18 // CHECK: volatile store i64 0, i64* getelementptr inbounds (%0* @vpa, i64 0, i32 0)
19 // CHECK: volatile store i64 0, i64* getelementptr inbounds (%0* @vpa, i64 0, i32 1)
20 vpa = 0;
21
22 // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pc, i64 0, i32 0)
23 // CHECK: store i64 4, i64* getelementptr inbounds (%0* @pc, i64 0, i32 1)
24 pc = pa;
25}