From 9e6aaf5ea5a8d86aaf1732c37753c1693add36e5 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 28 Apr 2003 06:13:23 +0000 Subject: [PATCH] * decl.c (maybe_commonize_var): Fix thinko in last patch. From-SVN: r66154 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d75773fc7ca..84578bdcf1e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2003-04-27 Mark Mitchell + + * decl.c (maybe_commonize_var): Fix thinko in last patch. + 2003-04-27 Mark Mitchell PR c++/10506 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 575a612d8f6..6fe39c83133 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7341,7 +7341,7 @@ maybe_commonize_var (tree decl) /* Unfortunately, import_export_decl has not always been called before the function is processed, so we cannot simply check DECL_COMDAT. */ - && (DECL_COMDAT (decl) + && (DECL_COMDAT (DECL_CONTEXT (decl)) || ((DECL_DECLARED_INLINE_P (DECL_CONTEXT (decl)) || DECL_TEMPLATE_INSTANTIATION (DECL_CONTEXT (decl))) && TREE_PUBLIC (DECL_CONTEXT (decl))))) -- 2.30.2