This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][OBVIOUS] Use xstrdup_for_dump in ipa-inline.c (PR ipa/81293).
- From: Martin Liška <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <hubicka at ucw dot cz>, zeccav at gmail dot com
- Date: Tue, 4 Jul 2017 12:49:02 +0200
- Subject: [PATCH][OBVIOUS] Use xstrdup_for_dump in ipa-inline.c (PR ipa/81293).
- Authentication-results: sourceware.org; auth=none
Hello.
It's obvious patch for case where we call cxx_printable_name_internal twice. Once a function
name is found in buffer in a slot that then release for purpose of the second function name
buffering.
Installed as obvious.
Martin
gcc/ChangeLog:
2017-07-04 Martin Liska <mliska@suse.cz>
PR ipa/81293
* ipa-inline.c (inline_small_functions):
Use xstrdup_for_dump.
---
gcc/ipa-inline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index fb20d3723cc..3ec7fd19993 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2048,8 +2048,8 @@ inline_small_functions (void)
fprintf (dump_file,
" Inlined %s into %s which now has time %f and size %i, "
"net change of %+i.\n",
- edge->callee->name (),
- edge->caller->name (),
+ xstrdup_for_dump (edge->callee->name ()),
+ xstrdup_for_dump (edge->caller->name ()),
ipa_fn_summaries->get (edge->caller)->time.to_double (),
ipa_fn_summaries->get (edge->caller)->size,
overall_size - old_size);