Hi,

in PR 57276, Po-Chun Chang noticed there is a missing break in a loop
in cgraph_edge_brings_all_agg_vals_for_node.  This patch adds it.

Bootstrapped and tested on x86_64-linux.  I consider it trivial and
will commit t some time tomorrow if there are no objections.

Thanks,

Martin


2013-05-15  Po-Chun Chang  <pcha...@cs.wisc.edu>
            Martin Jambor  <mjam...@suse.cz>

        PR middle-end/57276
        * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Break when a
        value that corresponds to the given aggval is found in values vector.

Index: src/gcc/ipa-cp.c
===================================================================
--- src.orig/gcc/ipa-cp.c
+++ src/gcc/ipa-cp.c
@@ -3213,7 +3213,10 @@ cgraph_edge_brings_all_agg_vals_for_node
              if (item->value
                  && item->offset == av->offset
                  && values_equal_for_ipcp_p (item->value, av->value))
-               found = true;
+               {
+                 found = true;
+                 break;
+               }
            if (!found)
              {
                values.release();

Reply via email to