From 4c5bae34c163fa87e5c137e71d4be728d4b21291 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 4 Sep 2007 15:53:21 +0000 Subject: [PATCH] decl.c (cp_finish_decl): Call determine_visibility before make_rtl_for_nonlocal_decl. gcc/cp/ * decl.c (cp_finish_decl): Call determine_visibility before make_rtl_for_nonlocal_decl. From-SVN: r128091 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 169cac234c1..63b7b207ef1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2007-09-04 Richard Sandiford + + * decl.c (cp_finish_decl): Call determine_visibility before + make_rtl_for_nonlocal_decl. + 2007-09-04 Jason Merrill PR c++/14032 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index fba084d1cd9..1b7012cb259 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5463,6 +5463,9 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, maybe_commonize_var (decl); } + /* This needs to happen after the linkage is set. */ + determine_visibility (decl); + make_rtl_for_nonlocal_decl (decl, init, asmspec); /* Check for abstractness of the type. Notice that there is no @@ -5474,9 +5477,6 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, else abstract_virtuals_error (decl, type); - /* This needs to happen after the linkage is set. */ - determine_visibility (decl); - if (TREE_CODE (decl) == FUNCTION_DECL || TREE_TYPE (decl) == error_mark_node) /* No initialization required. */ -- 2.30.2