diff mbox series

[Ada] Potential read of uninitialized variable in exp_dist.adb

Message ID 20201130141711.GA117802@adacore.com
State New
Headers show
Series [Ada] Potential read of uninitialized variable in exp_dist.adb | expand

Commit Message

Pierre-Marie de Rodat Nov. 30, 2020, 2:17 p.m. UTC
Found by using -gnatVa and Initialize_Scalars on GNAT sources.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* exp_dist.adb (RCI_Cache): Initialize.
diff mbox series

Patch

diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -902,7 +902,7 @@  package body Exp_Dist is
    -- Local variables and structures --
    ------------------------------------
 
-   RCI_Cache : Node_Id;
+   RCI_Cache : Node_Id := Empty;
    --  Needs comments ???
 
    Output_From_Constrained : constant array (Boolean) of Name_Id :=