aboutsummaryrefslogtreecommitdiff
path: root/gcc/multiple_target.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/multiple_target.cc')
-rw-r--r--gcc/multiple_target.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/multiple_target.cc b/gcc/multiple_target.cc
index d8becf4..d25277c 100644
--- a/gcc/multiple_target.cc
+++ b/gcc/multiple_target.cc
@@ -155,7 +155,11 @@ create_dispatcher_calls (struct cgraph_node *node)
symtab_node *source = ref->referring;
source->create_reference (inode, IPA_REF_ALIAS);
if (inode->get_comdat_group ())
- source->add_to_same_comdat_group (inode);
+ {
+ if (source->same_comdat_group)
+ source->remove_from_same_comdat_group ();
+ source->add_to_same_comdat_group (inode);
+ }
}
else
gcc_unreachable ();