re PR objc++/48479 (Many ICEs in the obj-c++.dg test suite on *-apple-darwin*)
authorNathan Froyd <froydnj@codesourcery.com>
Thu, 14 Apr 2011 18:46:34 +0000 (18:46 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Thu, 14 Apr 2011 18:46:34 +0000 (18:46 +0000)
PR objc++/48479
* typeck.c (cxx_mark_addressable) [CONST_DECL]: Mark addressable
and return immediately.

From-SVN: r172441

gcc/cp/ChangeLog
gcc/cp/typeck.c

index 86ee781d126c39449e8f626c72174ea9b5e8e559..d2d68ecd2b375ba90734a4a3ef5fb19a7c62f6ce 100644 (file)
@@ -1,3 +1,9 @@
+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.
index b0e211058f2a78d0baed669e46b4fce57da700d4..89d3247db3417cb61ba2716dda13bf5d36a7c106 100644 (file)
@@ -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;