blob: 8c28965c5c2f803d8ba2100c1677274becd83d43 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - -O2 | FileCheck %s
Shih-wei Liaoea285162010-06-04 12:34:56 -07002
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