http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50747
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-07 16:13:14 UTC --- The function in question is DECL_ABSTRACT (it's one of the B::B constructors). Not sure why we have a cgraph node for it at all: #0 cgraph_create_node (decl=0x7ffff5b92500) at /space/rguenther/src/svn/trunk/gcc/cgraph.c:495 #1 0x00000000009b6878 in cgraph_get_create_node (decl=0x7ffff5b92500) at /space/rguenther/src/svn/trunk/gcc/cgraph.c:543 #2 0x00000000008c3303 in c_genericize (fndecl=0x7ffff5b92500) at /space/rguenther/src/svn/trunk/gcc/c-family/c-gimplify.c:101 #3 0x0000000000858e0a in cp_genericize (fndecl=0x7ffff5b92500) at /space/rguenther/src/svn/trunk/gcc/cp/cp-gimplify.c:1172 #4 0x0000000000547836 in finish_function (flags=0) at /space/rguenther/src/svn/trunk/gcc/cp/decl.c:13478 #5 0x0000000000769a05 in synthesize_method (fndecl=0x7ffff5b92500) at /space/rguenther/src/svn/trunk/gcc/cp/method.c:774 #6 0x000000000068fd62 in mark_used (decl=0x7ffff5b92600) at /space/rguenther/src/svn/trunk/gcc/cp/decl2.c:4372 #7 0x00000000004d0a88 in build_over_call (cand=0x1f33fd0, flags=3, complain=3) at /space/rguenther/src/svn/trunk/gcc/cp/call.c:6727 #8 0x00000000004d590c in build_new_method_call_1 (instance=0x7ffff5a2c1e0, fns=0x7ffff5b79a80, args=0x7fffffffcc50, conversion_path=0x7ffff5b8c340, flags=3, fn_p=0x0, complain=3) at /space/rguenther/src/svn/trunk/gcc/cp/call.c:7337 The following fixes the ICE for Volkers testcase, but not the original from Markus: @@ -1431,8 +1444,9 @@ produce_symtab (struct output_block *ob, table: they end up being undefined and just consume space. */ if (!node->address_taken && !node->callers) { - gcc_assert (node->analyzed); - gcc_assert (DECL_DECLARED_INLINE_P (node->decl)); + gcc_assert ((node->analyzed + && DECL_DECLARED_INLINE_P (node->decl)) + || DECL_ABSTRACT (node->decl)); continue; } if (DECL_COMDAT (node->decl) why assert anything at all here? That is, that's the fix I'd do: @@ -1430,11 +1443,7 @@ produce_symtab (struct output_block *ob, them indirectly or via vtables. Do not output them to symbol table: they end up being undefined and just consume space. */ if (!node->address_taken && !node->callers) - { - gcc_assert (node->analyzed); - gcc_assert (DECL_DECLARED_INLINE_P (node->decl)); - continue; - } + continue; if (DECL_COMDAT (node->decl) && cgraph_comdat_can_be_unshared_p (node)) continue;