blob: 2d81ebd3a407d6358c37eac9f32db9c5702ce2c0 [file] [log] [blame]
Eli Friedmanc2c0d562009-12-18 23:42:55 +00001// RUN: %clang_cc1 %s -emit-llvm -o - -O2 | FileCheck %s
2
3struct B;
4extern B x;
5char y;
6typedef __typeof(sizeof(int)) size_t;
7struct A { int a; A() { y = ((size_t)this - (size_t)&x) / sizeof(void*); } };
8struct B : virtual A { void* x; };
9B x;
10
11// CHECK: @y = global i8 2