c++/4794

Nathanael Nerode neroden@twcny.rr.com
Wed Jan 1 19:34:00 GMT 2003


This is confirmed still present in mainline as of 2003-01-01.  There seems to 
be an infinite recursion in constant folding -- hope this helps 
somebody track it down.

GDB backtrace shows:
#1  0x08309478 in has_cleanups (exp=0x401811e0) at ../../gcc/gcc/tree.c:1820
#2  0x08309478 in has_cleanups (exp=0x40181420) at ../../gcc/gcc/tree.c:1820
#3  0x08309478 in has_cleanups (exp=0x40180208) at ../../gcc/gcc/tree.c:1820
...etc for a long time...

This is the top of the backtrace:
#95 0x081d23a3 in fold (expr=0x40180a64) at ../../gcc/gcc/fold-const.c:7231
#96 0x080ea175 in condition_conversion (expr=0x40185d60)
    at ../../gcc/gcc/cp/typeck.c:3919
#97 0x08106620 in maybe_convert_cond (cond=0x40185d60)
    at ../../gcc/gcc/cp/semantics.c:200
#98 0x08106722 in finish_if_stmt_cond (cond=0x40185d60, if_stmt=0x40147be0)
    at ../../gcc/gcc/cp/semantics.c:261
#99 0x080d3df9 in cp_parser_selection_statement (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:6026
#100 0x080d3a39 in cp_parser_statement (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:5761
#101 0x080d3d21 in cp_parser_statement_seq_opt (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:5969
#102 0x080d3cd7 in cp_parser_compound_statement (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:5941
#103 0x080d81ed in cp_parser_function_body (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:11162
#104 0x080d8217 in cp_parser_ctor_initializer_opt_and_function_body (
    parser=0x40177bd0) at ../../gcc/gcc/cp/parser.c:11179
#105 0x080db449 in cp_parser_function_definition_after_declarator (
    parser=0x40177bd0, inline_p=false) at ../../gcc/gcc/cp/parser.c:14055
#106 0x080db39b in 
cp_parser_function_definition_from_specifiers_and_declarator
    (parser=0x40177bd0, decl_specifiers=0x40167dfc, attributes=0x0,
    declarator=0x40147ba0, access_checks=0x0)
    at ../../gcc/gcc/cp/parser.c:13998
#107 0x080d6d91 in cp_parser_init_declarator (parser=0x40177bd0,
    decl_specifiers=0x40167dfc, prefix_attributes=0x0, access_checks=0x0,
    function_definition_allowed_p=true, member_p=false,
    function_definition_p=0xbffff9e0) at ../../gcc/gcc/cp/parser.c:9747
#108 0x080d4743 in cp_parser_simple_declaration (parser=0x40177bd0,
    function_definition_allowed_p=true) at ../../gcc/gcc/cp/parser.c:6731
#109 0x080d46d4 in cp_parser_block_declaration (parser=0x40177bd0,
    statement_p=false) at ../../gcc/gcc/cp/parser.c:6671
#110 0x080d45ce in cp_parser_declaration (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:6591
#111 0x080d4474 in cp_parser_declaration_seq_opt (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:6516
#112 0x080d0b29 in cp_parser_translation_unit (parser=0x40177bd0)
    at ../../gcc/gcc/cp/parser.c:2530
#113 0x080dc301 in yyparse () at ../../gcc/gcc/cp/parser.c:14901
#114 0x0813540d in c_common_parse_file (set_yydebug=0)
    at ../../gcc/gcc/c-lex.c:161
#115 0x082fff76 in compile_file () at ../../gcc/gcc/toplev.c:2128
#116 0x08304ea6 in do_compile () at ../../gcc/gcc/toplev.c:5352
#117 0x08304eff in toplev_main (argc=2, argv=0xbffffc14)
    at ../../gcc/gcc/toplev.c:5382
#118 0x0814b330 in main (argc=2, argv=0xbffffc14) at ../../gcc/gcc/main.c:37



More information about the Gcc-bugs mailing list