Under Linux/aarch64, when execute a function call with one arg is a struct, it pass wrong arg to the function call.
a test code: mmm.c ```c #include <stdio.h> struct vec { float x; float y; }; void bug(float y, float x) { printf("x=%f\ny=%f\n",x,y); } float dot(struct vec v) { return 10.0; } void main() { struct vec a; a.x = 2.0; a.y = 0.0; bug(dot(a), dot(a)); } ``` The correct result is : ``` x=10.000000 y=10.000000 ``` But linux/aarch64 tcc output a wrong result: ``` x=10.000000 y=2.000000 ``` kbkp...@sina.com
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel