about summary refs log tree commit diff homepage
path: root/test/Feature/Float.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Feature/Float.c')
-rw-r--r--test/Feature/Float.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Feature/Float.c b/test/Feature/Float.c
new file mode 100644
index 00000000..a1f54fd8
--- /dev/null
+++ b/test/Feature/Float.c
@@ -0,0 +1,22 @@
+// RUN: %llvmgcc -g -c %s -o %t.bc
+// RUN: %klee %t.bc > %t.log
+// RUN: grep "3.30* -1.10* 2.420*" %t.log
+
+#include <stdio.h>
+
+float fadd(float a, float b) {
+  return a + b;
+}
+
+float fsub(float a, float b) {
+  return a - b;
+}
+
+float fmul(float a, float b) {
+  return a * b;
+}
+
+int main() {
+  printf("%f %f %f\n", fadd(1.1, 2.2), fsub(1.1, 2.2), fmul(1.1, 2.2));
+  return 0;
+}