read-rtl.c (join_c_conditions): Return the first string if the two strings are equal.
authorRichard Sandiford <rsandifo@nildram.co.uk>
Thu, 8 May 2008 21:29:00 +0000 (21:29 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 8 May 2008 21:29:00 +0000 (21:29 +0000)
gcc/
* read-rtl.c (join_c_conditions): Return the first string if the
two strings are equal.

From-SVN: r135091

gcc/ChangeLog
gcc/read-rtl.c

index 7a53d5d62b554a64d0d91eff17c489f38455ec9c..cb7ee2ec286916ff34c09e7dd5ecad7de3292154 100644 (file)
@@ -1,3 +1,8 @@
+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.
index cc8fd974a2f8b3a368d1b610457e710a6f950a1d..902e1f6b7da90b2d0cc54efc1696a54bcc890fe3 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);