diff options
author | Jason Merrill <jason@redhat.com> | 2011-06-06 00:18:03 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-06-06 00:18:03 -0400 |
commit | efcbfc1c357ca34faf9adf2558362f2e3b1b7b94 (patch) | |
tree | f908a1886046ce99a4f2127a35e36e2eca0deac5 /gcc | |
parent | 22d60ad267dae84a52bd57521bcb8a99bf33eb41 (diff) | |
download | gcc-efcbfc1c357ca34faf9adf2558362f2e3b1b7b94.zip gcc-efcbfc1c357ca34faf9adf2558362f2e3b1b7b94.tar.gz gcc-efcbfc1c357ca34faf9adf2558362f2e3b1b7b94.tar.bz2 |
re PR objc++/49221 (Several ICEs in the obj-c++ test suite after revision 174307)
PR objc++/49221
* decl.c (cp_finish_decl): Check DECL_FUNCTION_SCOPE_P rather than
at_function_scope_p.
From-SVN: r174683
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 668dd5e..9d0b8f0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 232b5cf..30f70d9 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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 |