1// 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
12