On 8/29/2020 1:57 PM, Ken Brown via Cygwin wrote: >> #include <math.h> >> #include <stdio.h> >> #include <stdlib.h> >> >> int main(int argc, char *argv[]) { >> long double a, b, c; >> char *num_end = NULL; >> a = b = c = 0.0L; >> if (argc != 2) { >> fprintf(stderr, "Usage: %s NUMBER\n", argv[0]); >> exit(1); >> } >> a = strtold(argv[1], &num_end); >> b = modfl(a, &c); >> printf("%Lf %Lf %Lf\n", a, b, c); >> return 0; >> }
I'm using gcc 9.3, and this dies in modfl where it is trying to store the result back. The -O level does not seem to matter. modfl seems seriously broken. It comes from winsup in
base cygwin. I was running 3.1.6-1. I upgraded to 3.1.7-1 and got the same thing. This is the 64-bit cygwin. The 32-bit version of cygwin 3.1.6-1 processes and runs this just fine. Same version of gcc. It seems the math functions in winsup were not built quite right ... Regards - Eliot Moss -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple