Missing line (?) in better_state in ipa-pure-const.c

Marc Glisse marc.glisse@inria.fr
Tue Nov 12 10:05:00 GMT 2013


Hello,

this patch passed bootstrap+testsuite. I don't have a testcase, the code 
just looked strange.

2013-11-05  Marc Glisse  <marc.glisse@inria.fr>

 	PR tree-optimization/59077
 	* ipa-pure-const.c (better_state): Update *state.


-- 
Marc Glisse
-------------- next part --------------
Index: gcc/ipa-pure-const.c
===================================================================
--- gcc/ipa-pure-const.c	(revision 204694)
+++ gcc/ipa-pure-const.c	(working copy)
@@ -390,20 +390,21 @@ state_from_flags (enum pure_const_state_
 static inline void
 better_state (enum pure_const_state_e *state, bool *looping,
 	      enum pure_const_state_e state2, bool looping2)
 {
   if (state2 < *state)
     {
       if (*state == IPA_NEITHER)
 	*looping = looping2;
       else
 	*looping = MIN (*looping, looping2);
+      *state = state2;
     }
   else if (state2 != IPA_NEITHER)
     *looping = MIN (*looping, looping2);
 }
 
 /* Merge STATE and STATE2 and LOOPING and LOOPING2 and store
    into STATE and LOOPING worse of the two variants.  */
 
 static inline void
 worse_state (enum pure_const_state_e *state, bool *looping,


More information about the Gcc-patches mailing list