Testcase for r54520.
authorNick Lewycky <nicholas@mxc.ca>
Fri, 8 Aug 2008 07:00:26 +0000 (07:00 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 8 Aug 2008 07:00:26 +0000 (07:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54521 91177308-0d34-0410-b5e6-96231b3b80d8

test/FrontendC/2008-08-07-GEPIntToPtr.c [new file with mode: 0644]

diff --git a/test/FrontendC/2008-08-07-GEPIntToPtr.c b/test/FrontendC/2008-08-07-GEPIntToPtr.c
new file mode 100644 (file)
index 0000000..3ef3b66
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o - | grep {i8 1}
+// PR2603
+
+struct A {
+  char num_fields;
+};
+
+struct B {
+  char a, b[1];
+};
+
+const struct A Foo = {
+  (char *)(&( (struct B *)(16) )->b[0]) - (char *)(16)
+};