Mark Dickinson <dicki...@gmail.com> added the comment: I managed to reproduce this with Ubuntu 10.10 and the gcc-snapshot package. I've shrunk it to the following (no floating-point in sight!):
/* file dtoa.c */ static char s0[12]; char *_Py_dg_dtoa() { char *s = s0; *s++ = '9'; *s++ = '9'; while(*--s == '9') if (s == s0) { *s = '0'; break; } ++*s; return s0; } int main(void) { char *s; s = _Py_dg_dtoa(); return s[0] != '1'; } /* end file dtoa.c */ dicki...@ubuntu:~/bug$ /usr/lib/gcc-snapshot/bin/gcc -O0 dtoa.c && ./a.out && echo "Success" || echo "Failure" Success dicki...@ubuntu:~/bug$ /usr/lib/gcc-snapshot/bin/gcc -O1 dtoa.c && ./a.out && echo "Success" || echo "Failure" Failure ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9215> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com