tree-optimization/106913 - ICE with -da and -Wuninitialized
authorRichard Biener <rguenther@suse.de>
Tue, 13 Sep 2022 06:46:51 +0000 (08:46 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 13 Sep 2022 08:52:17 +0000 (10:52 +0200)
The following avoids setting and not clearing an auto_bb_flag
on EXIT_BLOCK which we don't verify for such stale flags but
dump_bb_info still asserts on them.

PR tree-optimization/106913
* tree-ssa-uninit.cc (warn_uninitialized_vars): Do not set
ft_reachable on EXIT_BLOCK.

gcc/tree-ssa-uninit.cc

index 4a1c333..eae29f8 100644 (file)
@@ -1013,11 +1013,9 @@ warn_uninitialized_vars (bool wmaybe_uninit)
       if (ee)
        bb = ee->dest;
       else
-       {
-         bb = get_immediate_dominator (CDI_POST_DOMINATORS, bb);
-         if (!bb || bb->index == EXIT_BLOCK)
-           break;
-       }
+       bb = get_immediate_dominator (CDI_POST_DOMINATORS, bb);
+      if (!bb || bb->index == EXIT_BLOCK)
+       break;
     }
 
   FOR_EACH_BB_FN (bb, cfun)