summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
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
commitc62dd9d3456d13f0967078c5bfa696da08c26733 (patch)
treeec5a77017745eb360221d46ffb12b31d7da2fb01 /clang/test/CodeGen
parent7f0639b0395b216d89b0ebbf2d24731dca4183af (diff)
downloadbcm5719-llvm-c62dd9d3456d13f0967078c5bfa696da08c26733.tar.gz
bcm5719-llvm-c62dd9d3456d13f0967078c5bfa696da08c26733.zip
Some const initializer tests for stuff I just committed.
llvm-svn: 47442
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/const-init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c
new file mode 100644
index 00000000000..e3f110d64ed
--- /dev/null
+++ b/clang/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;
OpenPOWER on IntegriCloud