From: Iain Buclaw Date: Mon, 30 Mar 2020 09:37:30 +0000 (+0200) Subject: d: Use d_comdat_linkage on generated internal decl. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=48742e02d7136e60e8e91631d76403d56e4eee09;p=gcc.git d: Use d_comdat_linkage on generated internal decl. This adds weak linkage to internal TypeInfo data on top of the existing DECL_COMDAT, which helps in the unlikely event that two of the same TypeInfo data ends up in multiple places. gcc/d/ChangeLog: * typeinfo.cc (TypeInfoVisitor::internal_reference): Call d_comdat_linkage on generated decl. --- diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 606f7f30eb0..ea1d7d5c896 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,8 @@ +2020-03-31 Iain Buclaw + + * typeinfo.cc (TypeInfoVisitor::internal_reference): Call + d_comdat_linkage on generated decl. + 2020-03-22 Iain Buclaw PR d/93038 diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc index 07011deaf6f..90a44944f4c 100644 --- a/gcc/d/typeinfo.cc +++ b/gcc/d/typeinfo.cc @@ -358,7 +358,7 @@ class TypeInfoVisitor : public Visitor DECL_EXTERNAL (decl) = 0; TREE_PUBLIC (decl) = 1; DECL_VISIBILITY (decl) = VISIBILITY_INTERNAL; - DECL_COMDAT (decl) = 1; + d_comdat_linkage (decl); d_pushdecl (decl); return decl;