aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/const-init.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-02-21 18:07:36 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-02-21 18:07:36 +0000
commitcca196b553bf3261d8db635a40ca4a78c32b2569 (patch)
tree68dd886bcdb9ee4dd09bedcb0e39680b74f8bf07 /test/CodeGen/const-init.c
parentaa1c4e5a6b87b62d991c55a0d4522bcd778068d7 (diff)
Some const initializer tests for stuff I just committed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47442 91177308-0d34-0410-b5e6-96231b3b80d8
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;