Hello,
since it seemed to me that there was some interest on bugs found in
the "free" compiler, I'm posting here my findings in addition to submitting
them to the debian tracker. I hope the proper tagging in the subject makes
this practice non-disturbing for people not interested in gnat.
Ludovic, is it ok to submit bugs that are not for any debian package, or
should I only submit bugs for the newest 4.1 version? I can check these, I
have both versions installed.
Summary: passing a not null access value to a not null entry parameter will
nonetheless raise an exception (a foretelling warning is issued during
compilation):
<
with Ada.Exceptions; use Ada.Exceptions;
with Text_Io; use Text_Io;
procedure Bug is
type Ai is access all Integer;
task TI is
entry Set (I : not null AI);
end TI;
task body TI is
begin
accept Set (I : not null AI);
end TI;
X : aliased Integer := 0;
begin
Ti.Set (X'Access);
exception
when E : others =>
Put_Line (Exception_Message (E));
abort TI;
end;
<
Execution:
$ gnatmake bug && echo Launching && ./bug
gcc -c bug.adb
bug.adb:18:06: warning: (Ada 2005) null-excluding objects must be
initialized
bug.adb:18:06: warning: "Constraint_Error" will be raised at run time
gnatbind -x bug.ali
gnatlink bug.ali
Launching
bug.adb:18 null-exclusion check failed
Removing the not null it works fine