mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
18 lines
334 B
C
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];
|
||
|
}
|
||
|
|