diff mbox

Fix PR testsuite/64712

Message ID 2495341.BWJ7HVKiPy@polaris
State New
Headers show

Commit Message

Eric Botcazou Jan. 26, 2015, 9:46 a.m. UTC
It's an uninitialized variable in a testcase I added back in 2008 that had 
been silent until we started to generate overflow checks by default.

Tested on x86_64-suse-linux, applied on the mainline and 4.9 branch.


2015-01-26  Eric Botcazou  <ebotcazou@adacore.com>

	PR testsuite/64712
	* gnat.dg/unchecked_convert1.adb (Unchecked_Convert1): Initialize A.
diff mbox

Patch

Index: gnat.dg/unchecked_convert1.adb
===================================================================
--- gnat.dg/unchecked_convert1.adb	(revision 220008)
+++ gnat.dg/unchecked_convert1.adb	(working copy)
@@ -4,6 +4,7 @@ 
 with Ada.Unchecked_Conversion;
 
 procedure Unchecked_Convert1 is
+
   type Byte is mod 2**8;
 
   type Stream is array (Natural range <>) of Byte;
@@ -24,9 +25,10 @@  procedure Unchecked_Convert1 is
     return Do_Sum (To_Chunk (S(S'First ..  S'First + Rec'Size / 8 - 1)));
   end;
 
-  A : Stream (1..9);
+  A : Stream (1..9) := (others => 0);
   I : Integer;
 
 begin
+  A (9) := 1;
   I := Sum (A(1..8));
 end;