As approved on the PR thread,
Iain

Index: gcc/objc/ChangeLog
===================================================================
--- gcc/objc/ChangeLog  (revision 180650)
+++ gcc/objc/ChangeLog  (working copy)
@@ -1,3 +1,10 @@
+2011-10-29  Iain Sandoe  <ia...@gcc.gnu.org>
+
+       PR target/47997
+       * objc-act.c (objc_build_string_object): Remove redundant second
+       call to fix_string_type ().  Add a checking assert that we are,
+       indeed, passed a STRING_CST.
+
 2011-10-18  Mikael Pettersson  <mi...@it.uu.se>
 
        PR objc/50743
Index: gcc/objc/objc-act.c
===================================================================
--- gcc/objc/objc-act.c (revision 180650)
+++ gcc/objc/objc-act.c (working copy)
@@ -3128,9 +3128,8 @@ objc_build_string_object (tree string)
   struct string_descriptor *desc, key;
   void **loc;
 
-  /* Prep the string argument.  */
-  string = fix_string_type (string);
-  TREE_SET_CODE (string, STRING_CST);
+  /* We should be passed a STRING_CST.  */
+  gcc_checking_assert (TREE_CODE (string) == STRING_CST);
   length = TREE_STRING_LENGTH (string) - 1;
 
   /* The target may have different ideas on how to construct an ObjC string

Reply via email to