[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / ByteCode / const-base-cast.cpp
blob80226b973bf97757733528c59f5e9fd9cdbe8126
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - -fexperimental-new-constant-interpreter | FileCheck %s
5 /// Slightly adapted to the version from test/CodeGenCXX/.
7 struct X { int x[12];};
8 struct A : X { char x, y, z; };
9 struct B { char y; };
10 struct C : A,B {};
11 unsigned char x = ((char*)(X*)(C*)0x1000) - (char*)0x1000;
12 // CHECK: @x = {{(dso_local )?}}global i8 0
14 unsigned char y = ((char*)(B*)(C*)0x1000) - (char*)0x1000;
15 // CHECK: @y = {{(dso_local )?}}global i8 51
17 unsigned char z = ((char*)(A*)(C*)0x1000) - (char*)0x1000;
18 // CHECK: @z = {{(dso_local )?}}global i8 0