Commit a96ced8e by Arnaud Charlet Committed by Arnaud Charlet

* gnat.dg/not_null.adb: New test.

From-SVN: r138694
parent c775e4a1
2008-08-04 Arnaud Charlet <charlet@adacore.com>
* gnat.dg/access_discr2.adb: New test.
* gnat.dg/not_null.adb: New test.
2008-08-04 Richard Guenther <rguenther@suse.de>
......
-- { dg-do run }
procedure not_null is
type Not_Null_Int_Ptr is not null access all Integer;
generic
F : Not_Null_Int_Ptr := null;
package GPack is
end GPack;
begin
declare
pragma Warnings (Off, "*null not allowed in null-excluding objects");
pragma Warnings (Off, """Constraint_Error"" will be raised at run time");
package Inst_2 is new GPack (null);
pragma Warnings (On, "*null not allowed in null-excluding objects");
pragma Warnings (On, """Constraint_Error"" will be raised at run time");
begin
null;
end;
exception
when Constraint_Error =>
null;
end not_null;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment