http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47218
--- Comment #6 from Dave Korn <davek at gcc dot gnu.org> 2011-01-08 19:00:25 UTC --- (In reply to comment #5) > Bug is caused by the change at rev 167795 applied to fix PR46667. > > http://gcc.gnu.org/viewcvs?view=revision&revision=167795 Full details at http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00446.html: >" It turns out that resolve_unique_function() is not called at all for the thunk function any more, where previously it was called from assemble_start_function called from cgraph_expand_function. This is because gimple_expand_cfg() isn't called for these thunk functions; they are emitted through a call chain that looks like: > (gdb) bt > #0 assemble_start_function (decl=0x7fe32f00, > fnname=0x7fe41860 "_ZThn4_N7FooBase3BarEv") > at /gnu/gcc/gcc-patched/gcc/varasm.c:1524 > #1 0x007aa73c in cgraph_expand_function (node=0x7ff80c30) > at /gnu/gcc/gcc-patched/gcc/cgraphunit.c:1328 > #2 0x007ad210 in cgraph_optimize () > at /gnu/gcc/gcc-patched/gcc/cgraphunit.c:1567 > #3 0x007ad69a in cgraph_finalize_compilation_unit () > at /gnu/gcc/gcc-patched/gcc/cgraphunit.c:1031 > #4 0x004ce825 in cp_write_global_declarations () > at /gnu/gcc/gcc-patched/gcc/cp/decl2.c:3974 > #5 0x0080ed6d in toplev_main (argc=14, argv=0x5079f78) > at /gnu/gcc/gcc-patched/gcc/toplev.c:591 > #6 0x0060699f in main (argc=Cannot access memory at address 0x0 > ) at /gnu/gcc/gcc-patched/gcc/main.c:36 " That's the main part of it.