decl.c (cp_finish_decl): Call determine_visibility before make_rtl_for_nonlocal_decl.
authorRichard Sandiford <richard@codesourcery.com>
Tue, 4 Sep 2007 15:53:21 +0000 (15:53 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 4 Sep 2007 15:53:21 +0000 (15:53 +0000)
gcc/cp/
* decl.c (cp_finish_decl): Call determine_visibility before
make_rtl_for_nonlocal_decl.

From-SVN: r128091

gcc/cp/ChangeLog
gcc/cp/decl.c

index 169cac234c140c5557c1431a545f820a90193959..63b7b207ef12b1ca61efc0602120b742196a03e1 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-04  Richard Sandiford  <richard@codesourcery.com>
+
+       * decl.c (cp_finish_decl): Call determine_visibility before
+       make_rtl_for_nonlocal_decl.
+
 2007-09-04  Jason Merrill  <jason@redhat.com>
 
        PR c++/14032
index fba084d1cd94a53a565c968f219ab8ccc2f6da6e..1b7012cb259fac47e51c6871015d4d34cc9bca22 100644 (file)
@@ -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.  */