aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CFrontend/2004-01-01-UnknownInitSize.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CFrontend/2004-01-01-UnknownInitSize.c b/test/CFrontend/2004-01-01-UnknownInitSize.c
new file mode 100644
index 0000000..076c54b
--- /dev/null
+++ b/test/CFrontend/2004-01-01-UnknownInitSize.c
@@ -0,0 +1,12 @@
+/*
+ * This regression test ensures that the C front end can compile initializers
+ * even when it cannot determine the size (as below).
+ */
+struct one
+{
+ int a;
+ int values [];
+};
+
+struct one hobbit = {5, {1, 2, 3}};
+