brintos

brintos / llvm-project-archived public Read only

0
0
Text · 674 B · 80226b9 Raw
20 lines · cpp
1// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s2// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - -fexperimental-new-constant-interpreter | FileCheck %s3 4 5/// Slightly adapted to the version from test/CodeGenCXX/.6 7struct X { int x[12];};8struct A : X { char x, y, z; };9struct B { char y; };10struct C : A,B {};11unsigned char x = ((char*)(X*)(C*)0x1000) - (char*)0x1000;12// CHECK: @x = {{(dso_local )?}}global i8 013 14unsigned char y = ((char*)(B*)(C*)0x1000) - (char*)0x1000;15// CHECK: @y = {{(dso_local )?}}global i8 5116 17unsigned char z = ((char*)(A*)(C*)0x1000) - (char*)0x1000;18// CHECK: @z = {{(dso_local )?}}global i8 019 20