blob: effc0a6de4a83f46cc9e2d9d98adc94f6aa487d7 [file] [log] [blame]
Eric Christopher3883e662011-07-26 22:17:02 +00001// RUN: %clang_cc1 %s -emit-llvm -O1 -o - | FileCheck %s
2// The load here was getting lost because this code was close
3// enough to the traditional (wrong) implementation of offsetof
4// to confuse the gcc FE. 8629268.
5
6struct foo {
7 int x;
8 int *y;
9};
10
11struct foo Foo[1];
12
13int * bar(unsigned int ix) {
14// CHECK: load
15 return &Foo->y[ix];
16}