------- Comment #3 from kenneth dot hoste at elis dot ugent dot be 2007-04-20 20:51 ------- identifying source code lines corresponding to infinite loop using GDB:
(gdb) backtrace #0 regclass (f=0x9ac29f4, nregs=71) at regclass.c:732 #1 0x08065d5c in rest_of_compilation (decl=0x9b4526c) at toplev.c:3056 #2 0x0805713b in finish_function (nested=0) at c-decl.c:6791 #3 0x08048a25 in yyparse () at c-parse.c:1684 #4 0x08066a83 in compile_file (name=Variable "name" is not available. ) at toplev.c:2227 #5 0x080681a3 in main (argc=4, argv=0xbf945ea4) at toplev.c:3921 (gdb) n 736 else if ((GET_CODE (insn) == INSN (gdb) n 717 for (insn = f; insn; insn = NEXT_INSN (insn)) (gdb) n 729 if (GET_CODE (insn) == NOTE (gdb) n 732 else if (GET_CODE (insn) == NOTE (gdb) n 736 else if ((GET_CODE (insn) == INSN (gdb) n 717 for (insn = f; insn; insn = NEXT_INSN (insn)) (gdb) backtrace #0 regclass (f=0x9ac29f4, nregs=71) at regclass.c:717 #1 0x08065d5c in rest_of_compilation (decl=0x9b4526c) at toplev.c:3056 #2 0x0805713b in finish_function (nested=0) at c-decl.c:6791 #3 0x08048a25 in yyparse () at c-parse.c:1684 #4 0x08066a83 in compile_file (name=Variable "name" is not available. ) at toplev.c:2227 #5 0x080681a3 in main (argc=4, argv=0xbf945ea4) at toplev.c:3921 (gdb) The program seems stuck in the for-loop at line 717. The value for insn seems to be cycling (it's taking different values, but cycles back to a previous value). Any pointers on how to reduce this further are welcome... Since this is (pretty old though) GCC code (the 176.gcc corresponds to a 2.x version of GCC I believe), maybe someone can shed soem light on this? I'm not at all familiar with GCCs insides... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31642