In the discussion for pr90037 Richi noticed that we had a cprop pass
after the restrict warning pass.  Those should be swapped.  This patch
swaps them.

Bootstrapped and regression tested on x86_64.

I wouldn't lose sleep if we decided to defer this to gcc-10.  But given
Richi and I both think it's the right thing to do I figured it was worth
consideration for gcc-9.

OK for the trunk, or defer to gcc-10?

Jeff
        * passes.def: Move -Wrestrict pass after copy propagation.

diff --git a/gcc/passes.def b/gcc/passes.def
index bc147c4444d..99640d50091 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -315,10 +315,10 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_strlen);
       NEXT_PASS (pass_thread_jumps);
       NEXT_PASS (pass_vrp, false /* warn_array_bounds_p */);
-      NEXT_PASS (pass_warn_restrict);
       /* Threading can leave many const/copy propagations in the IL.
         Clean them up.  */
       NEXT_PASS (pass_copy_prop);
+      NEXT_PASS (pass_warn_restrict);
       NEXT_PASS (pass_dse);
       NEXT_PASS (pass_cd_dce);
       NEXT_PASS (pass_forwprop);

Reply via email to