Le lundi 9 décembre 2013, 17:24:31 Pierre a écrit :
> Hello,
> Just post for a bug report, or I have done something wrong.
> the div function return bad result
> 
> #include <stdio.h>
> #include <stdlib.h>
> 
> div_t Te;
> 
> void main(void)
> {
>    Te = div(1000, 33);
>    printf("Res0 = %d %d\n", Te.quot, Te.rem);
> }
> 
> return 0 4077744
> (should return 30 10)

I don't think you did anything wrong as this work on arm / Linux. I tried 
testing on x86 but got an assert failing at line 419 of x86_64-gen.c.

> 
> Tested with tcc 0.9.26 win32 version on XP
> 
> I have used last tcc archive tcc-0.9.26-win32-bin.zip

Might be x86 specific or windows specific. Unfortunetely, I don't have access 
to 
a and the only x86 machines I have access to are quite remote from me which 
leads to terrible latency over ssh.

Could you first try with the current development code? Just clone the git 
repository with:

git clone git://repo.or.cz/tinycc.git

and then uses win32/build-tcc.bat to build tcc (as far as I know, I never 
compiled tcc for windows myself).

> 
> I'm not able to fix the tcc code because too complicated for me,
> I somebody could help me.
> Thanks.
> Pierre.

Best regards,

Thomas

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to