minix/external/bsd/llvm/dist/clang/test/CodeGen/arrayderef.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

16 lines
344 B
C

// RUN: %clang_cc1 %s -emit-llvm -O1 -o - | FileCheck %s
// The load here was getting lost because this code was close
// enough to the traditional (wrong) implementation of offsetof
// to confuse the gcc FE. 8629268.
struct foo {
int x;
int *y;
};
struct foo Foo[1];
int * bar(unsigned int ix) {
// CHECK: load
return &Foo->y[ix];
}