Re: [Tinycc-devel] function pointer problem on x86_64/macos/riscv

2020-07-16 Thread Herman ten Brugge via Tinycc-devel
Thanks for analyzing this so quickly. This only happened for one testcase in the gmp testsuite. It is also easy to fix. So not so important.     Herman On 2020-07-16 17:54, Michael Matz wrote: Hello, On Thu, 16 Jul 2020, Herman ten Brugge via Tinycc-devel wrote: While testing gmp on the x86_

Re: [Tinycc-devel] compare problem on riscv target

2020-07-16 Thread Michael Matz
Hello, On Thu, 16 Jul 2020, Herman ten Brugge via Tinycc-devel wrote: While testing gmp on the riscv target I discovered a compare bug. (t-get_d test fails in directory tests/mpq) The code: #include int tst(void) {   long value = 3;   return -value; } int main(void) {   printf ("%d\n", tst

Re: [Tinycc-devel] function pointer problem on x86_64/macos/riscv

2020-07-16 Thread Michael Matz
Hello, On Thu, 16 Jul 2020, Herman ten Brugge via Tinycc-devel wrote: While testing gmp on the x86_64 target I discovered a fuction pointer bug. (reuse in directory tests/mpf) The code: #include typedef int (*func) (int); func allfunc[] = { putchar }; int main(void) {   printf ("%d\n", all

[Tinycc-devel] function pointer problem on x86_64/macos/riscv

2020-07-16 Thread Herman ten Brugge via Tinycc-devel
While testing gmp on the x86_64 target I discovered a fuction pointer bug. (reuse in directory tests/mpf) The code: #include typedef int (*func) (int); func allfunc[] = { putchar }; int main(void) {   printf ("%d\n", allfunc[0] == putchar);   return 0; } prints 0 on x86_64, macos and riscv (

[Tinycc-devel] compare problem on riscv target

2020-07-16 Thread Herman ten Brugge via Tinycc-devel
While testing gmp on the riscv target I discovered a compare bug. (t-get_d test fails in directory tests/mpq) The code: #include int tst(void) {   long value = 3;   return -value; } int main(void) {   printf ("%d\n", tst());   if (tst() > 0) printf ("error\n");   return 0; } prints "error" o