* gnat.dg/warn19.ad[sb]: New test.
* gnat.dg/warn19_pkg.ads: New helper.
From-SVN: r265377
+2018-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/warn19.ad[sb]: New test.
+ * gnat.dg/warn19_pkg.ads: New helper.
+
2018-10-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/87640
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-O2 -Wuninitialized" }
+
+package body Warn19 is
+
+ procedure P_Init (X : out Bits) is
+ begin
+ Init (X);
+ end;
+
+ procedure Setup is
+ Data : Bits;
+ begin
+ P_Init (Data);
+ for I in Data'Range loop
+ P_Data (I) := Data (I);
+ end loop;
+ end;
+
+end Warn19;
--- /dev/null
+with Warn19_Pkg; use Warn19_Pkg;
+
+package Warn19 is
+ P_Data : Bits;
+ procedure Setup;
+end Warn19;
--- /dev/null
+package Warn19_Pkg is
+
+ type Bits is array (1 .. 4) of Boolean;
+ procedure Init (X : out Bits);
+
+end Warn19_Pkg;