[llvm-commits] [llvm] r118369 - /llvm/trunk/test/FrontendC/arrayderef.c

Dale Johannesen dalej at apple.com
Sat Nov 6 21:58:48 PDT 2010


Author: johannes
Date: Sat Nov  6 23:58:48 2010
New Revision: 118369

URL: http://llvm.org/viewvc/llvm-project?rev=118369&view=rev
Log:
Testcase for llvm-gcc 118368.  8629268.


Added:
    llvm/trunk/test/FrontendC/arrayderef.c

Added: llvm/trunk/test/FrontendC/arrayderef.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/arrayderef.c?rev=118369&view=auto
==============================================================================
--- llvm/trunk/test/FrontendC/arrayderef.c (added)
+++ llvm/trunk/test/FrontendC/arrayderef.c Sat Nov  6 23:58:48 2010
@@ -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];
+}
+





More information about the llvm-commits mailing list