diff options
Diffstat (limited to 'gcc/cp/optimize.cc')
-rw-r--r-- | gcc/cp/optimize.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/optimize.cc b/gcc/cp/optimize.cc index ff4fb5be5bd..b8791d8a963 100644 --- a/gcc/cp/optimize.cc +++ b/gcc/cp/optimize.cc @@ -220,10 +220,8 @@ can_alias_cdtor (tree fn) gcc_assert (DECL_MAYBE_IN_CHARGE_CDTOR_P (fn)); /* Don't use aliases for weak/linkonce definitions unless we can put both symbols in the same COMDAT group. */ - return (DECL_INTERFACE_KNOWN (fn) - && (SUPPORTS_ONE_ONLY || !DECL_WEAK (fn)) - && (!DECL_ONE_ONLY (fn) - || (HAVE_COMDAT_GROUP && DECL_WEAK (fn)))); + return (DECL_WEAK (fn) ? (HAVE_COMDAT_GROUP && DECL_ONE_ONLY (fn)) + : (DECL_INTERFACE_KNOWN (fn) && !DECL_ONE_ONLY (fn))); } /* FN is a [cd]tor, fns is a pointer to an array of length 3. Fill fns @@ -712,7 +710,7 @@ maybe_clone_body (tree fn) if (expand_or_defer_fn_1 (clone)) emit_associated_thunks (clone); /* We didn't generate a body, so remove the empty one. */ - DECL_SAVED_TREE (clone) = NULL_TREE; + DECL_SAVED_TREE (clone) = void_node; } else expand_or_defer_fn (clone); |