summaryrefslogtreecommitdiff
path: root/gcc/ipa-visibility.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-visibility.c')
-rw-r--r--gcc/ipa-visibility.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c
index 4e0fd9e0b40..9e4d8c38f4b 100644
--- a/gcc/ipa-visibility.c
+++ b/gcc/ipa-visibility.c
@@ -566,7 +566,11 @@ function_and_variable_visibility (bool whole_program)
cheaper and enable more optimization.
TODO: We can also update virtual tables. */
- if (node->callers && can_replace_by_local_alias (node))
+ if (node->callers
+ /* FIXME: currently this optimization breaks on AIX. Disable it for targets
+ without comdat support for now. */
+ && SUPPORTS_ONE_ONLY
+ && can_replace_by_local_alias (node))
{
struct cgraph_node *alias = cgraph (symtab_nonoverwritable_alias (node));