This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 5/5] workaround for PR70427
- From: Andi Kleen <andi at firstfloor dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Andi Kleen <ak at linux dot intel dot com>
- Date: Sat, 21 May 2016 09:36:26 -0700
- Subject: [PATCH 5/5] workaround for PR70427
- Authentication-results: sourceware.org; auth=none
- References: <1463848586-19259-1-git-send-email-andi at firstfloor dot org> <1463848586-19259-2-git-send-email-andi at firstfloor dot org> <1463848586-19259-3-git-send-email-andi at firstfloor dot org> <1463848586-19259-4-git-send-email-andi at firstfloor dot org> <1463848586-19259-5-git-send-email-andi at firstfloor dot org>
From: Andi Kleen <ak@linux.intel.com>
This makes autofdo bootstrap not crash.
This is probably not the right fix, but for now it works for me.
Not for submission.
---
gcc/ipa-profile.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c
index da17bcd..c7d7792 100644
--- a/gcc/ipa-profile.c
+++ b/gcc/ipa-profile.c
@@ -201,6 +201,8 @@ ipa_profile_generate_summary (void)
if (h->hvalue.counters[2])
{
struct cgraph_edge * e = node->get_edge (stmt);
+ if (!e)
+ continue;
if (e && !e->indirect_unknown_callee)
continue;
e->indirect_info->common_target_id
--
2.8.2