re PR objc++/49221 (Several ICEs in the obj-c++ test suite after revision 174307)
authorJason Merrill <jason@redhat.com>
Mon, 6 Jun 2011 04:18:03 +0000 (00:18 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 6 Jun 2011 04:18:03 +0000 (00:18 -0400)
PR objc++/49221
* decl.c (cp_finish_decl): Check DECL_FUNCTION_SCOPE_P rather than
at_function_scope_p.

From-SVN: r174683

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

index 668dd5e19d4861128ed961b53251ce25c5daa95d..9d0b8f0d9f85be269063b946b4c5009b7f548ef9 100644 (file)
@@ -1,5 +1,9 @@
 2011-06-06  Jason Merrill  <jason@redhat.com>
 
+       PR objc++/49221
+       * decl.c (cp_finish_decl): Check DECL_FUNCTION_SCOPE_P rather than
+       at_function_scope_p.
+
        PR c++/49134
        * tree.c (build_target_expr): Deal with ARM ABI tweaks.
 
index 232b5cf12f3fefc14e45e1eab35c224a27857f68..30f70d9e6ee18b888753f211bd5976a2d06f4645 100644 (file)
@@ -6190,7 +6190,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
   /* Add this declaration to the statement-tree.  This needs to happen
      after the call to check_initializer so that the DECL_EXPR for a
      reference temp is added before the DECL_EXPR for the reference itself.  */
-  if (at_function_scope_p ())
+  if (DECL_FUNCTION_SCOPE_P (decl))
     add_decl_expr (decl);
 
   /* Let the middle end know about variables and functions -- but not