brintos

brintos / llvm-project-archived public Read only

0
0
Text · 374 B · 0c10e20 Raw
12 lines · cpp
1// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - -O2 | opt - -S -passes=globalopt -o - | FileCheck %s2 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 = {{(dso_local )?}}local_unnamed_addr global i8 212