aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-01-08 22:19:04 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2016-01-08 21:19:04 +0000
commit78fcec3fee63f10cfde06c252fc391e768c64b12 (patch)
tree142bfe8409d03ecb341d4035935b06349d843fba /gcc
parente0237993b6bce554cc36c00a258f99f486a46d63 (diff)
downloadgcc-78fcec3fee63f10cfde06c252fc391e768c64b12.zip
gcc-78fcec3fee63f10cfde06c252fc391e768c64b12.tar.gz
gcc-78fcec3fee63f10cfde06c252fc391e768c64b12.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-icf.c3
2 files changed, 7 insertions, 1 deletions
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 <hubicka@ucw.cz>
+
+ * ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL
+ w/o DECL_NAME.
+
2016-01-08 Jakub Jelinek <jakub@redhat.com>
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];