summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/conditional.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/conditional.c')
-rw-r--r--clang/test/CodeGen/conditional.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/conditional.c b/clang/test/CodeGen/conditional.c
new file mode 100644
index 00000000000..ef3283d1d49
--- /dev/null
+++ b/clang/test/CodeGen/conditional.c
@@ -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;
+}
+*/
OpenPOWER on IntegriCloud