Testcase that crashes llvmgcc in type layout
authorChris Lattner <sabre@nondot.org>
Wed, 19 Oct 2005 00:52:21 +0000 (00:52 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 19 Oct 2005 00:52:21 +0000 (00:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23806 91177308-0d34-0410-b5e6-96231b3b80d8

test/CFrontend/2005-10-18-VariableSizedElementCrash.c [new file with mode: 0644]

diff --git a/test/CFrontend/2005-10-18-VariableSizedElementCrash.c b/test/CFrontend/2005-10-18-VariableSizedElementCrash.c
new file mode 100644 (file)
index 0000000..9efa110
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -o -
+// XFAIL: *
+int sub1(int i, char *pi) {
+  typedef int foo[i];
+  struct bar {foo f1; int f2:3; int f3:4} *p = (struct bar *) pi;
+  xxx(p->f1);  
+  return p->f3;
+}
+