From 78fcec3fee63f10cfde06c252fc391e768c64b12 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 8 Jan 2016 22:19:04 +0100 Subject: ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL w/o DECL_NAME. * ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL w/o DECL_NAME. From-SVN: r232179 --- gcc/ChangeLog | 5 +++++ gcc/ipa-icf.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 194f390..151cb89 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-01-09 Jan Hubicka + + * ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL + w/o DECL_NAME. + 2016-01-08 Jakub Jelinek PR tree-optimization/69167 diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index be5d0b7..aaa6a47 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -3400,7 +3400,8 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count) sem_item *source = c->members[0]; - if (MAIN_NAME_P (DECL_NAME (source->decl))) + if (DECL_NAME (source->decl) + && MAIN_NAME_P (DECL_NAME (source->decl))) /* If merge via wrappers, picking main as the target can be problematic. */ source = c->members[1]; -- cgit v1.1