1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/FrontendC/arrayderef.c
Dale Johannesen d48eca9b43 Testcase for llvm-gcc 118368. 8629268.
llvm-svn: 118369
2010-11-07 04:58:48 +00:00

18 lines
334 B
C

// RUN: %llvmgcc %s -S -O -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];
}