aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-09-23 02:51:40 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-09-23 00:51:40 +0000
commit60108d34dc4958a8b4081ceb0c833f76648e7157 (patch)
tree101fce60f8be93e2d49a7ca27ef11256887c00e0 /gcc/dwarf2out.c
parente53de54da399b14c108c994a81c047502cf4a513 (diff)
downloadgcc-60108d34dc4958a8b4081ceb0c833f76648e7157.zip
gcc-60108d34dc4958a8b4081ceb0c833f76648e7157.tar.gz
gcc-60108d34dc4958a8b4081ceb0c833f76648e7157.tar.bz2
re PR debug/17389 (ICE in dwarf2out_finish, at dwarf2out.c:13566)
PR debug/17389 * dwarf2out.c (dwarf2out_finish): Deal with nested functions of fully inlined functions. * tree-inline.c (inline_forbidden_p_1): Nested functions can be inlined. From-SVN: r87911
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index e269629..3c47864 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13554,7 +13554,12 @@ dwarf2out_finish (const char *filename)
nested function can be optimized away, which results
in the nested function die being orphaned. Likewise
with the return type of that nested function. Force
- this to be a child of the containing function. */
+ this to be a child of the containing function.
+
+ It may happen that even the containing function got fully
+ inlined and optimized out. In that case we are lost and
+ assign the empty child. This should not be big issue as
+ the function is likely unreachable too. */
tree context = NULL_TREE;
gcc_assert (node->created_for);
@@ -13567,8 +13572,8 @@ dwarf2out_finish (const char *filename)
gcc_assert (context && TREE_CODE (context) == FUNCTION_DECL);
origin = lookup_decl_die (context);
- gcc_assert (origin);
- add_child_die (origin, die);
+ if (origin)
+ add_child_die (origin, die);
}
}
}