summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1996-04-26 21:36:40 +0000
committerJason Merrill <merrill@gnu.org>1996-04-26 21:36:40 +0000
commit7303f45c7544c9bdca4911c7bea78c8fa6986800 (patch)
tree7b167249ae9595e4d67de4f250900145b4670ae2 /gcc/cp/decl2.c
parent637166fe38d18739525dd29ce586c188457efa14 (diff)
downloadgcc-7303f45c7544c9bdca4911c7bea78c8fa6986800.tar.gz
Fixes
From-SVN: r11897
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 5c9cf35d7a1..d42bc926c38 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2979,7 +2979,7 @@ finish_file ()
{
temp = build_cleanup (decl);
- if (DECL_COMMON (decl))
+ if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
{
tree sentry = get_sentry (DECL_ASSEMBLER_NAME (decl));
sentry = build_unary_op (PREDECREMENT_EXPR, sentry, 0);
@@ -2989,7 +2989,7 @@ finish_file ()
expand_expr_stmt (temp);
- if (DECL_COMMON (decl))
+ if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
expand_end_cond ();
}
}
@@ -3048,10 +3048,7 @@ finish_file ()
|| DECL_EXTERNAL (decl)
|| (init && TREE_CODE (init) == TREE_LIST
&& value_member (error_mark_node, init)))
- {
- vars = TREE_CHAIN (vars);
- goto next_mess;
- }
+ goto next_mess;
if (TREE_CODE (decl) == VAR_DECL)
{
@@ -3066,7 +3063,7 @@ finish_file ()
DECL_CLASS_CONTEXT (current_function_decl) = DECL_CONTEXT (decl);
DECL_STATIC_FUNCTION_P (current_function_decl) = 1;
- if (DECL_COMMON (decl))
+ if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
{
tree sentry = get_sentry (DECL_ASSEMBLER_NAME (decl));
sentry = build_unary_op (PREINCREMENT_EXPR, sentry, 0);
@@ -3088,7 +3085,7 @@ finish_file ()
else
expand_assignment (decl, init, 0, 0);
- if (DECL_COMMON (decl))
+ if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
expand_end_cond ();
DECL_CLASS_CONTEXT (current_function_decl) = NULL_TREE;