* [Ada] Potential read of uninitialized variable in exp_dist.adb
@ 2020-11-30 14:17 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-11-30 14:17 UTC (permalink / raw)
To: gcc-patches; +Cc: Arnaud Charlet
[-- Attachment #1: Type: text/plain, Size: 165 bytes --]
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.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 399 bytes --]
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 :=
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-30 14:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 14:17 [Ada] Potential read of uninitialized variable in exp_dist.adb Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).