summaryrefslogtreecommitdiff
path: root/test/FrontendC/2005-10-18-VariableSizedElementCrash.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC/2005-10-18-VariableSizedElementCrash.c')
-rw-r--r--test/FrontendC/2005-10-18-VariableSizedElementCrash.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/FrontendC/2005-10-18-VariableSizedElementCrash.c b/test/FrontendC/2005-10-18-VariableSizedElementCrash.c
new file mode 100644
index 0000000000000..b9166621db4a8
--- /dev/null
+++ b/test/FrontendC/2005-10-18-VariableSizedElementCrash.c
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -o -
+
+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;
+}
+