------- Comment #5 from foom at fuhm dot net 2009-10-30 02:42 ------- An error very much like this is also causing a bunch of files in my program to fail to compile with 4.5 with -O1 and above. I was unable to reduce a simple test case from my (private) code, though: many changes that seem like they should be unrelated cause the bug to go away. So I really hope my bug is actually the same thing as this already-somewhat-reduced test case. :)
I'm using the ubuntu gcc-snapshot 20091018 package, on x86-64. The error message is a little bit different, so I'm including it below, just in case you might think it indicates a different underlying cause. error: edge points to wrong declaration: <function_decl 0x2ab0adeb6600 _ZNSdD2Ev.clone.5 type <method_type 0x2ab0ae8f5cc0 type <void_type 0x2ab09c4476c0 void asm_written type_6 VOID align 8 symtab 0 alias set -1 canonical type 0x2ab09c4476c0 pointer_to_this <pointer_type 0x2ab09c447780>> QI size <integer_cst 0x2ab09c421840 constant 8> unit size <integer_cst 0x2ab09c421870 constant 1> align 8 symtab 0 alias set -1 canonical type 0x2ab09e701240 method basetype <record_type 0x2ab0a06a9c00 basic_iostream> arg-types <tree_list 0x2ab0aea8a750 value <pointer_type 0x2ab09e6fdb40> chain <tree_list 0x2ab09c445960 value <void_type 0x2ab09c4476c0 void>>> pointer_to_this <pointer_type 0x2ab0a4991cc0>> addressable used nothrow static in_system_header autoinline decl_5 QI defer-output file /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 7 align 16 context <record_type 0x2ab0a06a9c00 basic_iostream> initial <block 0x2ab0aea8cf00> abstract_origin <function_decl 0x2ab09e6f7d00 basic_iostream> arguments <parm_decl 0x2ab0aea82510 this type <pointer_type 0x2ab09e6fdcc0 type <record_type 0x2ab0a06a9c00 basic_iostream> readonly unsigned DI size <integer_cst 0x2ab09c421bd0 constant 64> unit size <integer_cst 0x2ab09c421c00 constant 8> align 64 symtab -1364669056 alias set -1 canonical type 0x2ab09e6fdcc0> readonly used unsigned DI file /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 23 size <integer_cst 0x2ab09c421bd0 64> unit size <integer_cst 0x2ab09c421c00 8> align 64 context <function_decl 0x2ab0adeb6600 _ZNSdD2Ev.clone.5> abstract_origin <parm_decl 0x2ab09e6fe240 this> arg-type <pointer_type 0x2ab09e6fdcc0>> result <result_decl 0x2ab0acb8cf80 D.395631 type <void_type 0x2ab09c4476c0 void> used ignored VOID file /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 27 align 8 context <function_decl 0x2ab0adeb6600 _ZNSdD2Ev.clone.5> abstract_origin <result_decl 0x2ab0ab71c980 D.304296>> full-name "std::basic_iostream<_CharT, _Traits>::~basic_iostream() [with _CharT = char, _Traits = std::char_traits<char>]" pending-inline-info 0x2ab0ab72f000 template-info 0x2ab09e6faf90 struct-function 0x2ab0ab58f6e0> Instead of: <function_decl 0x2ab09e702400 __base_dtor type <method_type 0x2ab09e701240 type <void_type 0x2ab09c4476c0 void asm_written type_6 VOID align 8 symtab 0 alias set -1 canonical type 0x2ab09c4476c0 pointer_to_this <pointer_type 0x2ab09c447780>> QI size <integer_cst 0x2ab09c421840 constant 8> unit size <integer_cst 0x2ab09c421870 constant 1> align 8 symtab 0 alias set -1 canonical type 0x2ab09e701240 method basetype <record_type 0x2ab0a06a9c00 basic_iostream> arg-types <tree_list 0x2ab09e700180 value <pointer_type 0x2ab09e6fdb40> chain <tree_list 0x2ab09e48ede0 value <pointer_type 0x2ab09d8c9480> chain <tree_list 0x2ab09c445960 value <void_type 0x2ab09c4476c0 void>>>> pointer_to_this <pointer_type 0x2ab0a4991cc0>> addressable used nothrow public static external in_system_header autoinline decl_5 QI defer-output file /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 7 align 16 context <record_type 0x2ab0a06a9c00 basic_iostream> initial <block 0x2ab0ab72c2a0> abstract_origin <function_decl 0x2ab09e6f7d00 basic_iostream> arguments <parm_decl 0x2ab09e703120 this type <pointer_type 0x2ab09e6fdcc0 type <record_type 0x2ab0a06a9c00 basic_iostream> readonly unsigned DI size <integer_cst 0x2ab09c421bd0 constant 64> unit size <integer_cst 0x2ab09c421c00 constant 8> align 64 symtab -1364669056 alias set -1 canonical type 0x2ab09e6fdcc0> readonly unsigned DI file /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 23 size <integer_cst 0x2ab09c421bd0 64> unit size <integer_cst 0x2ab09c421c00 8> align 64 context <function_decl 0x2ab09e702400 __base_dtor > abstract_origin <parm_decl 0x2ab09e6fe240 this> arg-type <pointer_type 0x2ab09e6fdcc0> chain <parm_decl 0x2ab09e703240 __vtt_parm type <pointer_type 0x2ab09d8c9480> readonly unsigned DI file /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 7 size <integer_cst 0x2ab09c421bd0 64> unit size <integer_cst 0x2ab09c421c00 8> align 64 context <function_decl 0x2ab09e702400 __base_dtor > abstract_origin <parm_decl 0x2ab09e6fe2d0 __vtt_parm> arg-type <pointer_type 0x2ab09d8c9480>>> result <result_decl 0x2ab0ab71c980 D.304296 type <void_type 0x2ab09c4476c0 void> ignored VOID file /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.5.0/../../../../include/c++/4.5.0/istream line 798 col 27 align 8 context <function_decl 0x2ab09e702400 __base_dtor >> full-name "std::basic_iostream<_CharT, _Traits>::~basic_iostream() [with _CharT = char, _Traits = std::char_traits<char>]" pending-inline-info 0x2ab0ab72f000 template-info 0x2ab09e6faf90 struct-function 0x2ab0ab71ed20 chain <function_decl 0x2ab09e702300 __comp_dtor >> -- foom at fuhm dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |foom at fuhm dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41290