From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ca3e85884ea1ce68,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: [bug: gnat gpl 2006] call to entry with 'not null' formal causes exception Date: Mon, 17 Jul 2006 16:16:36 +0200 Message-ID: <4i1k9hF1nufbU1@individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net hvtgm2Nj2MPfXgLP5ulttAkrP4mRuE4sA5ZnoAI/MEjPou/LQ= User-Agent: KNode/0.10.2 Xref: g2news2.google.com comp.lang.ada:5738 Date: 2006-07-17T16:16:36+02:00 List-Id: 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): ----8<---------- 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; ------8<-------------------- 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...