This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8068
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: Laurent dot Deniau at cern dot ch, Ovidiu dot Achim at cern dot ch, gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: Wed, 1 Jan 2003 10:23:51 -0500
- Subject: Re: c++/8068
- Reply-to: neroden at twcny dot rr dot com
I did a gdb backtrace on this.
There's a very dense recursion going on.
#49 0x0812b1b1 in fold (expr=0x64e2c020) at ../../gcc/gcc/fold-const.c:5505
#50 0x0812513e in extract_muldiv (t=0x455b1de0, c=0x5fa18020, code=MULT_EXPR,
wide_type=0x0) at ../../gcc/gcc/fold-const.c:4304
#51 0x08124c75 in extract_muldiv (t=0x4a9c6ee0, c=0x5fa18020, code=MULT_EXPR,
wide_type=0x0) at ../../gcc/gcc/fold-const.c:4179
#52 0x0812b1b1 in fold (expr=0x5fa18040) at ../../gcc/gcc/fold-const.c:5505
...
These three entries are repeated over and over and over again. The one in
'fold' is the entry point.
So this is a (near?) infinite recursion in the constant folding code. Ick.
The top of the backtrace is:
#55 0x0812b1b1 in fold (expr=0x551ef060) at ../../gcc/gcc/fold-const.c:5505
#56 0x0807a441 in build_binary_op (code=MULT_EXPR, orig_op0=0x551ef020,
orig_op1=0x551ef040, convert_p=1) at ../../gcc/gcc/c-typeck.c:2579
#57 0x08078860 in parser_build_binary_op (code=MULT_EXPR, arg1=0x551ef020,
arg2=0x551ef040) at ../../gcc/gcc/c-typeck.c:1755
#58 0x0804ab30 in yyparse () at c-parse.y:540
#59 0x08063cbd in c_common_parse_file (set_yydebug=0)
at ../../gcc/gcc/c-lex.c:161
#60 0x0825fc86 in compile_file () at ../../gcc/gcc/toplev.c:2128
#61 0x08264bb6 in do_compile () at ../../gcc/gcc/toplev.c:5352
#62 0x08264c0f in toplev_main (argc=3, argv=0xbffffbf4)
at ../../gcc/gcc/toplev.c:5382
#63 0x080ab6b4 in main (argc=3, argv=0xbffffbf4) at ../../gcc/gcc/main.c:37
Hope this helps...