aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/compatible-function-types.c17
-rw-r--r--tests/compatible-function-types.qbe16
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/compatible-function-types.c b/tests/compatible-function-types.c
new file mode 100644
index 0000000..0e63a1c
--- /dev/null
+++ b/tests/compatible-function-types.c
@@ -0,0 +1,17 @@
+void f1();
+void f1(int, void *);
+
+int f2();
+int f2(double);
+
+void f3() {}
+void f3(void);
+
+void f4(int, char *);
+void f4(int, char *);
+
+void f5(x, y) unsigned x; double y; {}
+void f5(unsigned, double);
+
+void f6(const char *, ...);
+void f6(const char[], ...);
diff --git a/tests/compatible-function-types.qbe b/tests/compatible-function-types.qbe
new file mode 100644
index 0000000..27d9b32
--- /dev/null
+++ b/tests/compatible-function-types.qbe
@@ -0,0 +1,16 @@
+export
+function $f3() {
+@start.1
+@body.2
+ ret
+}
+export
+function $f5(w %.1, d %.3) {
+@start.3
+ %.2 =l alloc4 4
+ storew %.1, %.2
+ %.4 =l alloc8 8
+ stored %.3, %.4
+@body.4
+ ret
+}