mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
Testcase for llvm-gcc 118368. 8629268.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118369 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9e07a149b0
commit
7944988c25
17
test/FrontendC/arrayderef.c
Normal file
17
test/FrontendC/arrayderef.c
Normal file
@ -0,0 +1,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];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user