aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/send_through/send_through_gcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/send_through/send_through_gcc.c')
-rw-r--r--test/monniaux/send_through/send_through_gcc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/monniaux/send_through/send_through_gcc.c b/test/monniaux/send_through/send_through_gcc.c
new file mode 100644
index 00000000..83541cee
--- /dev/null
+++ b/test/monniaux/send_through/send_through_gcc.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include "send_through.h"
+
+double sum_int_double(int x, double y) {
+ return x + y;
+}
+
+float sum_int_float(int x, float y) {
+ return x + y;
+}
+
+int main() {
+ double x = send_through_double(sum_int_double, 2, 3, 4.5);
+ float y = send_through_float(sum_int_float, 2, 3, 4.5f);
+ printf("x[gcc] = %f\n", x);
+ printf("y[gcc] = %f\n", y);
+ print_from_ccomp(x);
+}