From: kaz K. <kk...@rr...> - 2001-08-16 03:04:02
|
"Bao C. Ha" <ba...@se...> wrote: > -static works > -O2 does not work (crash!) > > Following is a gdb session when it crashes. Note the > "correct" values of dum = -0.95105654 and status = 1! > > Breakpoint 1, main () at test.c:13 > 13 status = fscanf(fptr,"%f", &dum); > (gdb) n > 14 printf("\n status=%x\n", (int)status); > (gdb) print dum > $3 = -0.95105654 > (gdb) print status > $4 = 1 Can you please check the result of the following gdb commands at this point? (gdb) set archi sh4 (gdb) p/x $fpscr If you don't get 0x8xxxx as the value of fpscr register, the cause of the crash will be the wrong mode of FPU. kaz |