Bug 42725 - ICE on error recovery (segfault in build_over_call in gcc/cp/call.c:5653)
Summary: ICE on error recovery (segfault in build_over_call in gcc/cp/call.c:5653)
Status: RESOLVED DUPLICATE of bug 42701
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: error-recovery, ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2010-01-13 13:14 UTC by Matthias Klose
Modified: 2010-01-13 17:44 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.5.0
Last reconfirmed: 2010-01-13 13:42:32


Attachments
preprocessed source (560.61 KB, application/x-gzip)
2010-01-13 13:17 UTC, Matthias Klose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2010-01-13 13:14:59 UTC
seen with trunk 20100112

$ g++ -c -g -O2 -c mainwindow.ii 
mainwindow.cc: In member function 'void MainWindow::preprocess()':
mainwindow.cc:273:13: warning: deprecated conversion from string constant to 'char*'
mainwindow.cc:274:13: warning: deprecated conversion from string constant to 'char*'
mainwindow.cc:283:69: error: cannot call constructor 'Gdk::Color::Color' directly
mainwindow.cc:283:69: note: for a function-style cast, remove the redundant '::Color'
mainwindow.cc:302:64: error: no matching function for call to 'mem_fun(CommandLine*&, MainWindow&, void (MainWindow::*)(double))'
mainwindow.cc: In member function 'void MainWindow::update_status(Result)':
mainwindow.cc:470:71: error: cannot call constructor 'Gdk::Color::Color' directly
mainwindow.cc:470:71: note: for a function-style cast, remove the redundant '::Color'
mainwindow.cc:475:70: error: cannot call constructor 'Gdk::Color::Color' directly
mainwindow.cc:475:70: note: for a function-style cast, remove the redundant '::Color'
mainwindow.cc:475:70: error: no matching function for call to 'Gdk::Color::Color(char*, const char [5])'
/usr/include/gdkmm-2.4/gdkmm/color.h:101:12: note: candidates are: Gdk::Color::Color(const Glib::ustring&)
/usr/include/gdkmm-2.4/gdkmm/color.h:93:3: note:                 Gdk::Color::Color()
/usr/include/gdkmm-2.4/gdkmm/color.h:66:3: note:                 Gdk::Color::Color(const Gdk::Color&)
/usr/include/gdkmm-2.4/gdkmm/color.h:64:12: note:                 Gdk::Color::Color(GdkColor*, bool)
mainwindow.cc:479: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/ccPPxROy.out file, please attach this to your bugreport.

Program received signal SIGSEGV, Segmentation fault.
build_over_call (cand=<value optimized out>, flags=<value optimized out>, complain=<value optimized out>) at ../../src/gcc/cp/call.c:5653
5653          if (conv->kind == ck_rvalue
(gdb) bt
#0  build_over_call (cand=<value optimized out>, flags=<value optimized out>, complain=<value optimized out>) at ../../src/gcc/cp/call.c:5653
#1  0x00000000004a8b09 in build_new_method_call (instance=<value optimized out>, fns=<value optimized out>, args=<value optimized out>, 
    conversion_path=<value optimized out>, flags=<value optimized out>, fn_p=0x0, complain=<value optimized out>) at ../../src/gcc/cp/call.c:6449
#2  0x00000000005100dc in cp_parser_postfix_expression (parser=0x7ffff3102000, address_p=<value optimized out>, cast_p=<value optimized out>, 
    member_access_only_p=0 '\000', pidk_return=0x0) at ../../src/gcc/cp/parser.c:4885
#3  0x0000000000504d2f in cp_parser_unary_expression (parser=0x7ffff3102000, address_p=0 '\000', cast_p=0 '\000', pidk=<value optimized out>)
    at ../../src/gcc/cp/parser.c:5666
#4  0x00000000005054ba in cp_parser_binary_expression (parser=0x7ffff3102000, cast_p=<value optimized out>, no_toplevel_fold_p=<value optimized out>, 
    prec=PREC_NOT_OPERATOR, pidk=<value optimized out>) at ../../src/gcc/cp/parser.c:6336
#5  0x00000000005057f8 in cp_parser_assignment_expression (parser=0x7ffff3102000, cast_p=<value optimized out>, pidk=0x2)
    at ../../src/gcc/cp/parser.c:6547
#6  0x0000000000505a2a in cp_parser_expression (parser=0x7ffff3102000, cast_p=<value optimized out>, pidk=0x0) at ../../src/gcc/cp/parser.c:6693
#7  0x0000000000505c47 in cp_parser_expression_statement (parser=0x7ffff3102000, in_statement_expr=0x0) at ../../src/gcc/cp/parser.c:7804
#8  0x0000000000500f97 in cp_parser_statement (parser=0x7ffff3102000, in_statement_expr=0x0, in_compound=<value optimized out>, 
    if_p=<value optimized out>) at ../../src/gcc/cp/parser.c:7669
#9  0x0000000000501a1b in cp_parser_statement_seq_opt (parser=0x7ffff3102000, in_statement_expr=0x0) at ../../src/gcc/cp/parser.c:7915
#10 0x0000000000501a90 in cp_parser_compound_statement (parser=0x7ffff3102000, in_statement_expr=0x0, in_try=<value optimized out>)
    at ../../src/gcc/cp/parser.c:7872
#11 0x000000000050126f in cp_parser_selection_statement (parser=0x7ffff3102000, in_statement_expr=0x0, in_compound=<value optimized out>, 
    if_p=<value optimized out>) at ../../src/gcc/cp/parser.c:8061
#12 cp_parser_statement (parser=0x7ffff3102000, in_statement_expr=0x0, in_compound=<value optimized out>, if_p=<value optimized out>)
    at ../../src/gcc/cp/parser.c:7575
#13 0x0000000000501a1b in cp_parser_statement_seq_opt (parser=0x7ffff3102000, in_statement_expr=0x0) at ../../src/gcc/cp/parser.c:7915
#14 0x0000000000501a90 in cp_parser_compound_statement (parser=0x7ffff3102000, in_statement_expr=0x0, in_try=<value optimized out>)
    at ../../src/gcc/cp/parser.c:7872
#15 0x000000000050c447 in cp_parser_ctor_initializer_opt_and_function_body (parser=0x7ffff3102000) at ../../src/gcc/cp/parser.c:15385
#16 0x0000000000501c7b in cp_parser_function_definition_after_declarator (parser=0x7ffff3102000, inline_p=0 '\000') at ../../src/gcc/cp/parser.c:18623
#17 0x0000000000502606 in cp_parser_function_definition_from_specifiers_and_declarator (parser=0x7ffff3102000, decl_specifiers=<value optimized out>, 
    checks=<value optimized out>, function_definition_allowed_p=<value optimized out>, member_p=0 '\000', declares_class_or_enum=<value optimized out>, 
    function_definition_p=<value optimized out>) at ../../src/gcc/cp/parser.c:18552
#18 cp_parser_init_declarator (parser=0x7ffff3102000, decl_specifiers=<value optimized out>, checks=<value optimized out>, 
    function_definition_allowed_p=<value optimized out>, member_p=0 '\000', declares_class_or_enum=<value optimized out>, 
    function_definition_p=<value optimized out>) at ../../src/gcc/cp/parser.c:13529
#19 0x000000000050b683 in cp_parser_simple_declaration (parser=0x7ffff3102000, function_definition_allowed_p=1 '\001') at ../../src/gcc/cp/parser.c:8934
#20 0x000000000050bb7e in cp_parser_block_declaration (parser=0x7ffff3102000, statement_p=0 '\000') at ../../src/gcc/cp/parser.c:8832
#21 0x0000000000510ef6 in cp_parser_declaration (parser=0x7ffff3102000) at ../../src/gcc/cp/parser.c:8737
#22 0x0000000000510bb5 in cp_parser_declaration_seq_opt (parser=0x7ffff3102000) at ../../src/gcc/cp/parser.c:8628
#23 0x0000000000511815 in cp_parser_translation_unit () at ../../src/gcc/cp/parser.c:3089
#24 c_parse_file () at ../../src/gcc/cp/parser.c:23117
#25 0x0000000000589f6f in c_common_parse_file (set_yydebug=<value optimized out>) at ../../src/gcc/c-opts.c:1279
#26 0x000000000079f37c in compile_file (argc=14, argv=0x7fffffffe608) at ../../src/gcc/toplev.c:1053
#27 do_compile (argc=14, argv=0x7fffffffe608) at ../../src/gcc/toplev.c:2405
#28 toplev_main (argc=14, argv=0x7fffffffe608) at ../../src/gcc/toplev.c:2447
#29 0x00007ffff616cabd in __libc_start_main () from /lib/libc.so.6
#30 0x000000000049f179 in _start ()
Comment 1 Matthias Klose 2010-01-13 13:17:26 UTC
Created attachment 19571 [details]
preprocessed source
Comment 2 Richard Biener 2010-01-13 13:42:32 UTC
Confirmed.  4.4 accepts the code, reducing based on that.
Comment 3 H.J. Lu 2010-01-13 15:07:13 UTC
It is caused by revision 155347:

http://gcc.gnu.org/ml/gcc-cvs/2009-12/msg00491.html
Comment 4 H.J. Lu 2010-01-13 17:44:18 UTC

*** This bug has been marked as a duplicate of 42701 ***