From 565603f84a2e28d476744670e386774613477e04 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 5 Nov 2007 23:11:57 +0000 Subject: [PATCH] re PR c++/33871 (typeinfo name referenced in ... defined in discarded section) 2007-11-05 H.J. Lu PR c++/33871 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked local. From-SVN: r129911 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl2.c | 1 + 2 files changed, 7 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 36b7726ee5b..cbd2380fc15 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-11-05 H.J. Lu + + PR c++/33871 + * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked + local. + 2007-11-05 Douglas Gregor PR c++/33996 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index ddc8999aa0c..d3ca1178950 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1704,6 +1704,7 @@ constrain_visibility (tree decl, int visibility) if (!DECL_EXTERN_C_P (decl)) { TREE_PUBLIC (decl) = 0; + DECL_ONE_ONLY (decl) = 0; DECL_INTERFACE_KNOWN (decl) = 1; if (DECL_LANG_SPECIFIC (decl)) DECL_NOT_REALLY_EXTERN (decl) = 1;