warn19.ad[sb]: New test.

* gnat.dg/warn19.ad[sb]: New test.
	* gnat.dg/warn19_pkg.ads: New helper.

From-SVN: r265377
This commit is contained in:
Eric Botcazou 2018-10-22 10:29:57 +00:00 committed by Eric Botcazou
parent 2c2f867416
commit bbc960279d
4 changed files with 37 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,20 @@
-- { 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;

View File

@ -0,0 +1,6 @@
with Warn19_Pkg; use Warn19_Pkg;
package Warn19 is
P_Data : Bits;
procedure Setup;
end Warn19;

View File

@ -0,0 +1,6 @@
package Warn19_Pkg is
type Bits is array (1 .. 4) of Boolean;
procedure Init (X : out Bits);
end Warn19_Pkg;