OSDN Git Service

gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 May 2008 21:29:00 +0000 (21:29 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 May 2008 21:29:00 +0000 (21:29 +0000)
* read-rtl.c (join_c_conditions): Return the first string if the
two strings are equal.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135091 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/read-rtl.c

index 7a53d5d..cb7ee2e 100644 (file)
@@ -1,5 +1,10 @@
 2008-05-08  Richard Sandiford  <rsandifo@nildram.co.uk>
 
+       * read-rtl.c (join_c_conditions): Return the first string if the
+       two strings are equal.
+
+2008-05-08  Richard Sandiford  <rsandifo@nildram.co.uk>
+
        * gensupport.h (pred_data): Add a "num_codes" field.
        (add_predicate_code): Declare.
        * gensupport.c (add_predicate_code): New function.
index cc8fd97..902e1f6 100644 (file)
@@ -787,6 +787,9 @@ join_c_conditions (const char *cond1, const char *cond2)
   if (cond2 == 0 || cond2[0] == 0)
     return cond1;
 
+  if (strcmp (cond1, cond2) == 0)
+    return cond1;
+
   result = concat ("(", cond1, ") && (", cond2, ")", NULL);
   obstack_ptr_grow (&joined_conditions_obstack, result);
   obstack_ptr_grow (&joined_conditions_obstack, cond1);