]> granicus.if.org Git - clang/commitdiff
Check in these testcases.
authorChris Lattner <sabre@nondot.org>
Fri, 13 Jul 2007 20:18:44 +0000 (20:18 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 13 Jul 2007 20:18:44 +0000 (20:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39829 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/conditional.c [new file with mode: 0644]
test/CodeGen/int-to-pointer.c [new file with mode: 0644]

diff --git a/test/CodeGen/conditional.c b/test/CodeGen/conditional.c
new file mode 100644 (file)
index 0000000..ef3283d
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: clang -emit-llvm %s
+
+float test1(int cond, float a, float b)
+{
+  return cond ? a : b;
+}
+/* this will fail for now...
+double test2(int cond, float a, double b)
+{
+  return cond ? a : b;
+}
+*/
diff --git a/test/CodeGen/int-to-pointer.c b/test/CodeGen/int-to-pointer.c
new file mode 100644 (file)
index 0000000..fdb6188
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: clang -emit-llvm %s
+
+void *test(int i)
+{
+  return (void *)i;
+}