Message109906
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 */
dickinsm@ubuntu:~/bug$ /usr/lib/gcc-snapshot/bin/gcc -O0 dtoa.c && ./a.out && echo "Success" || echo "Failure"
Success
dickinsm@ubuntu:~/bug$ /usr/lib/gcc-snapshot/bin/gcc -O1 dtoa.c && ./a.out && echo "Success" || echo "Failure"
Failure |
|
Date |
User |
Action |
Args |
2010-07-10 18:37:42 | mark.dickinson | set | recipients:
+ mark.dickinson, doko, eric.smith |
2010-07-10 18:37:42 | mark.dickinson | set | messageid: <1278787062.7.0.69525087856.issue9215@psf.upfronthosting.co.za> |
2010-07-10 18:37:41 | mark.dickinson | link | issue9215 messages |
2010-07-10 18:37:41 | mark.dickinson | create | |
|