diff --git a/test/bins/Makefile b/test/bins/Makefile index 50eef138..ba130e5a 100644 --- a/test/bins/Makefile +++ b/test/bins/Makefile @@ -3,7 +3,7 @@ all: .PHONY: clean clean: - rm -fv dectest32 dectest64 rec + rm -fv dectest32 dectest64 rec sharedReturn.o dectest32: dectest.c types.h gcc -m32 -fno-pic -no-pie -fno-omit-frame-pointer -o dectest32 -O0 dectest.c @@ -22,3 +22,6 @@ rec: rec.c types_rec.h strings: strings.c gcc -m64 -fno-pic -no-pie -fno-omit-frame-pointer -o strings -O0 strings.c + +sharedReturn.o: sharedReturn.c + gcc -m64 -fno-pic -no-pie -fno-omit-frame-pointer -fno-inline -o sharedReturn.o -O2 -c sharedReturn.c diff --git a/test/bins/sharedReturn.c b/test/bins/sharedReturn.c new file mode 100644 index 00000000..b7ec2a11 --- /dev/null +++ b/test/bins/sharedReturn.c @@ -0,0 +1,13 @@ +#include + +int getNum(void); +int calc(int a, int b); + +int main(void){ + int c = getNum(); + + if (c > 2) + return calc(c, 2); + else + return 0; +} \ No newline at end of file diff --git a/test/bins/sharedReturn.o b/test/bins/sharedReturn.o new file mode 100644 index 00000000..9abf334e Binary files /dev/null and b/test/bins/sharedReturn.o differ