aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/const-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/const-init.c')
-rw-r--r--test/CodeGen/const-init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c
new file mode 100644
index 0000000000..e3f110d64e
--- /dev/null
+++ b/test/CodeGen/const-init.c
@@ -0,0 +1,13 @@
+// RUN: clang -emit-llvm %s
+
+#include <stdint.h>
+
+// Brace-enclosed string array initializers
+char a[] = { "asdf" };
+
+// Double-implicit-conversions of array/functions (not legal C, but
+// clang accepts it for gcc compat).
+intptr_t b = a;
+int c();
+void *d = c;
+intptr_t e = c;