aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2011-04-14 18:46:34 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2011-04-14 18:46:34 +0000
commit81c1113ac93b0df9ae0c89e6f071d148accee40f (patch)
treea37bc7ce7f2a58a9d984876f418e46cc17a2c301 /gcc
parent1f18dbc6a6de7752b6569228c3076715e60c9fc7 (diff)
downloadgcc-81c1113ac93b0df9ae0c89e6f071d148accee40f.zip
gcc-81c1113ac93b0df9ae0c89e6f071d148accee40f.tar.gz
gcc-81c1113ac93b0df9ae0c89e6f071d148accee40f.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/typeck.c2
2 files changed, 7 insertions, 1 deletions
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 <froydnj@codesourcery.com>
+ PR objc++/48479
+ * typeck.c (cxx_mark_addressable) [CONST_DECL]: Mark addressable
+ and return immediately.
+
+2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
+
* 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;