This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Endless loop during bootstrap?


 Hi,

  I tried to bootstrap gcc on sparc-linux.  However, it seems to be stuck
in some loop.

 So far linking crt0 in stage2 cc1 has taken a lot of time:
14856 jim       18   0  3096 3096 1920 R 80.5  1.2 268:44.24 cc1

 This is the line which seems to be taking so long.
./xgcc -B./ -B/usr/local/sparc-unknown-linux-gnu/bin/ -isystem /usr/local/spa
rc-unknown-linux-gnu/include -isystem /usr/local/sparc-unknown-linux-gnu/sys-
include -L/home/jim/cvs/gcc.ssh/sparcif0/gcc/../ld -O2 -DIN_GCC    -W -Wall -
Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definitio
n  -isystem ./include  -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/
gcc/../include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exce
ptions -fno-zero-initialized-in-bss -fno-unit-at-a-time  \
   -c ../../gcc/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o

 I attached gdb to the cc1 process and got this backtrace:
Attaching to program: /usr/local/cvs/gcc.ssh/sparcif0/gcc/cc1, process 14856
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0x001da4a8 in real_to_decimal (str=0xefffd700 "", r_orig=Variable "r_orig" is not available.
)
    at ../../gcc/gcc/real.c:1460
1460        dec_exp /= 10;
Breakpoint 1 at 0xac664: file ../../gcc/gcc/diagnostic.c, line 583.
Breakpoint 2 at 0x700610e4
Breakpoint 3 at 0x7005ffe0
(gdb) bt
#0  0x001da4a8 in real_to_decimal (str=0xefffd700 "", r_orig=Variable "r_orig" is not available.
)
    at ../../gcc/gcc/real.c:1460
#1  0x0006ca04 in builtin_define_with_hex_fp_value (
    macro=0x40 <Address 0x40 out of bounds>, type=0x7036dab0, digits=9,
    hex_str=0xefffd7c8 "0x0.ffffffp128", fp_suffix=0x0)
    at ../../gcc/gcc/c-cppbuiltin.c:545
#2  0x0006cd40 in builtin_define_float_constants (
    name_prefix=0xefffd848 "__FLT_MAX__", fp_suffix=0x7036dab0 "", type=0x9)
    at ../../gcc/gcc/c-cppbuiltin.c:208

 Well, the infinite loop seems to be where gdb says it was at line 1460
of real.c:
  for (max_digits = 1; dec_exp ; max_digits++)
    dec_exp /= 10;

 I can't print dec_exp since gdb doesn't seem to handle that dwarf2 
expression, but max_digits is:
(gdb) p max_digits
$1 = 3716048565

Any ideas what needs to be fixed?

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]