cfg.c: redundant second assignment of bb_copy = NULL in free_original_copy_tables()

Prathamesh Kulkarni prathamesh.kulkarni@linaro.org
Fri Sep 2 10:14:00 GMT 2016


Hi,
There appears to be a redundant second assignmeent bb_copy = NULL in
free_copy_original_tables(). I suppose it should be
bb_original = NULL instead ?
I found this mentioned on a blog "Bugs found in gcc with help of PVS studio":
http://www.viva64.com/en/b/0425/#ID0EHCCK

Thanks,
Prathamesh
-------------- next part --------------
diff --git a/gcc/cfg.c b/gcc/cfg.c
index 0e31780..cab66c6 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -1075,7 +1075,7 @@ free_original_copy_tables (void)
   delete bb_copy;
   bb_copy = NULL;
   delete bb_original;
-  bb_copy = NULL;
+  bb_original = NULL;
   delete loop_copy;
   loop_copy = NULL;
   delete original_copy_bb_pool;


More information about the Gcc mailing list