The following makes sure to delete the loads we previously allocated
with new.

Bootstrapped and tested on x86_64-unknown-linux-gnu.

OK?

Thanks,
Richard.

gcc/
        * config/i386/i386-features.cc (pass_x86_cse::x86_cse): Delete
        loads.
---
 gcc/config/i386/i386-features.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc
index 8e277843f23..f1f118d5b75 100644
--- a/gcc/config/i386/i386-features.cc
+++ b/gcc/config/i386/i386-features.cc
@@ -4810,6 +4810,9 @@ pass_x86_cse::x86_cse (void)
       df_process_deferred_rescans ();
     }
 
+  FOR_EACH_VEC_ELT (loads, i, load)
+    delete load;
+
   df_clear_flags (DF_DEFER_INSN_RESCAN);
 
   timevar_pop (TV_MACH_DEP);
-- 
2.51.0

Reply via email to