From 6291062f31171ec846ec6d54f1e6c8c5b327bd9d Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 9 Jan 2018 09:22:28 +0100 Subject: [PATCH] re PR c++/80763 (-O3 causes error: inline clone in same comdat group list) PR ipa/80763 * ipa-comdats.c (set_comdat_group): Only set comdat group of real symbols; not inline clones. From-SVN: r256369 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-comdats.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 084b0d7e7c8..54703e95316 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-09 Jan Hubicka + + PR ipa/80763 + * ipa-comdats.c (set_comdat_group): Only set comdat group of real + symbols; not inline clones. + 2018-01-09 Jakub Jelinek PR target/83507 diff --git a/gcc/ipa-comdats.c b/gcc/ipa-comdats.c index 1940d9d62f5..243756ab0b8 100644 --- a/gcc/ipa-comdats.c +++ b/gcc/ipa-comdats.c @@ -211,8 +211,11 @@ set_comdat_group (symtab_node *symbol, symtab_node *head = (symtab_node *)head_p; gcc_assert (!symbol->get_comdat_group ()); - symbol->set_comdat_group (head->get_comdat_group ()); - symbol->add_to_same_comdat_group (head); + if (symbol->real_symbol_p ()) + { + symbol->set_comdat_group (head->get_comdat_group ()); + symbol->add_to_same_comdat_group (head); + } return false; } -- 2.30.2