From: iains Date: Sat, 29 Oct 2011 12:59:30 +0000 (+0000) Subject: gcc/objc: X-Git-Tag: upstream/4.9.2~16685 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a8f7a54dc6cc5c1a493c8c777d17ec63b541bbf;p=platform%2Fupstream%2Flinaro-gcc.git gcc/objc: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180653 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 6e32f5f..26b9898 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,10 @@ +2011-10-29 Iain Sandoe + + 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 PR objc/50743 diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 9690113..4a024f4 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -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