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