~mcf/cproc

4b74d8aa68fca6692782a47277e1dade5a2b039e — Michael Forney 5 months ago 041234b
Add struct passing call test

The struct-passing test checks for function definitions with struct
arguments, but we were missing a test for function calls with struct
arguments.
2 files changed, 17 insertions(+), 0 deletions(-)

A test/struct-passing-call.c
A test/struct-passing-call.qbe
A test/struct-passing-call.c => test/struct-passing-call.c +8 -0
@@ 0,0 1,8 @@
struct s {
	int x;
} s;

void f(struct s);
void g(void) {
	f(s);
}

A test/struct-passing-call.qbe => test/struct-passing-call.qbe +9 -0
@@ 0,0 1,9 @@
type :s.1 = { w, }
export
function $g() {
@start.1
@body.2
	call $f(:s.1 $s)
	ret
}
export data $s = align 4 { z 4 }