From 81c1113ac93b0df9ae0c89e6f071d148accee40f Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 14 Apr 2011 18:46:34 +0000 Subject: [PATCH] re PR objc++/48479 (Many ICEs in the obj-c++.dg test suite on *-apple-darwin*) PR objc++/48479 * typeck.c (cxx_mark_addressable) [CONST_DECL]: Mark addressable and return immediately. From-SVN: r172441 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/typeck.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 86ee781..d2d68ec 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2011-04-14 Nathan Froyd + PR objc++/48479 + * typeck.c (cxx_mark_addressable) [CONST_DECL]: Mark addressable + and return immediately. + +2011-04-14 Nathan Froyd + * cp-tree.def (SWITCH_STMT): Add an extra operand. * cp-objcp-common.c (cp_common_init_ts): Mark it as TS_TYPED. * cp-tree.h (SWITCH_STMT_SCOPE): Define. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index b0e2110..89d3247 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -5373,7 +5373,6 @@ cxx_mark_addressable (tree exp) || DECL_EXTERNAL (x)); /* Fall through. */ - case CONST_DECL: case RESULT_DECL: if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x) && !DECL_ARTIFICIAL (x)) @@ -5391,6 +5390,7 @@ cxx_mark_addressable (tree exp) TREE_ADDRESSABLE (x) = 1; return true; + case CONST_DECL: case FUNCTION_DECL: TREE_ADDRESSABLE (x) = 1; return true; -- 2.7.4