llvm-project/clang/test/CodeGenCXX/2005-01-03-StaticInitializers.cpp
Alex Richardson a18181931f [NFC][clang] Add a CHECK lines to tests checking offsetof-like expressions
I am looking at constant-folding changes that could affect these tests, so
check that it emits the expected global value instead of just checking
that it doesn't crash.
2021-09-28 17:57:36 +01:00

10 lines
266 B
C++

// RUN: %clang_cc1 -triple=x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -triple=i386-linux-gnu -emit-llvm %s -o - | FileCheck %s
struct S {
int A[2];
};
// CHECK: @XX = global i32 4, align 4
int XX = (int)(long)&(((struct S*)0)->A[1]);