Re: m68k OCaml porting issue

2021-12-22 Thread John Klos
Another simpler example, not involving unions: -8<- #include #include #include int main(int argc, char** argv) { double d[2]; d[0] = NAN; d[1] = -d[0]; printf("%F\n", d[1]); } -8<- Gives NAN on '030 & '882, '040, '060, with gcc 7.4.0 & gcc 10.3.0. Does Linux sup

Re: m68k OCaml porting issue

2021-12-22 Thread Laurent Vivier
Le 22/12/2021 à 15:40, John Paul Adrian Glaubitz a écrit : Hi Stéphane! On 12/22/21 14:47, Stéphane Glondu wrote: Another simpler example, not involving unions: -8<- #include #include #include int main(int argc, char** argv) { double d[2]; d[0] = NAN; d[1] = -d[0]; prin

Re: m68k OCaml porting issue

2021-12-22 Thread John Paul Adrian Glaubitz
Hi Stéphane! On 12/22/21 14:47, Stéphane Glondu wrote: > Another simpler example, not involving unions: > > -8<- > #include > #include > #include > > int main(int argc, char** argv) { > double d[2]; > d[0] = NAN; > d[1] = -d[0]; > printf("%F\n", d[1]); > } > -8<- > >

Re: m68k OCaml porting issue

2021-12-22 Thread Stéphane Glondu
Le 22/12/2021 à 13:45, Stéphane Glondu a écrit : > While debugging OCaml 4.13.1's testsuite on m68k, I've noticed that the > following: > [...] > which seems to be incorrect. > [...] Another simpler example, not involving unions: -8<- #include #include #include int main(int argc, char

m68k OCaml porting issue

2021-12-22 Thread Stéphane Glondu
Hello, While debugging OCaml 4.13.1's testsuite on m68k, I've noticed that the following: -8<- #include #include #include #include int main(int argc, char** argv) { int i = atoi(argv[1]); union { double d; int64_t i; } u[2]; u[0].i = 0x7FF1L; u[1].d = -u[0].d; p