summaryrefslogtreecommitdiff
path: root/test/FrontendC/arrayderef.c
blob: 66c2e0ba41653a539ad1d289761802d4d8d100a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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];
}