public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Remove double initialization of the known value cache
@ 2020-12-14 15:56 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-12-14 15:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]

Global variable CV_Cache, where values known at compilation time are
stored, was initialization both by elaboration and by
Sem_Eval.Initialize, which is called from Gnatdrv1 and required by the
GNSA (GNAT Semantic Analyzer).

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

gcc/ada/

	* sem_eval.adb (CV_Cache): Remove initialization at elaboration.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 476 bytes --]

diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb
--- a/gcc/ada/sem_eval.adb
+++ b/gcc/ada/sem_eval.adb
@@ -124,7 +124,7 @@ package body Sem_Eval is
 
    type CV_Cache_Array is array (CV_Range) of CV_Entry;
 
-   CV_Cache : CV_Cache_Array := (others => (Node_High_Bound, Uint_0));
+   CV_Cache : CV_Cache_Array;
    --  This is the actual cache, with entries consisting of node/value pairs,
    --  and the impossible value Node_High_Bound used for unset entries.
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-14 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 15:56 [Ada] Remove double initialization of the known value cache 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).