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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c66d09a3a91fd87f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-25 01:39:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!isdnet!enst!enst.fr!not-for-mail From: Christoph Grein Newsgroups: comp.lang.ada Subject: Re: It seems bug in GNAT with overloading in assignment Date: Mon, 25 Feb 2002 10:37:12 +0100 (MET) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1014629942 84115 137.194.161.2 (25 Feb 2002 09:39:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 25 Feb 2002 09:39:02 +0000 (UTC) Return-Path: Content-MD5: 9pu/ZX8/NRo2NAs6c14kEA== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk X-Reply-To: Christoph Grein List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:20352 Date: 2002-02-25T10:37:12+01:00 This is definitely a Gnat bug, ObjectAda is correct. Report it to report@gnat.com (not sure whether email address is correct). > Trying to understand overloading rules I wrote a following test. > I would like to see what error compiler reported. > But it didn't report any error. I tried with 3.13p and 3.14p > for Windows. > Then I setup ObjectAda to tried with it. ObjectAda > reported "Ambiguous assignment". > Finally I removed Dummy parameter from function declaration > and gnat crashed with message "GNAT BUG DETECTED" > > Here is the test: > ------ test.adb > with Ada.Text_IO; > > procedure Test is > > type Int_A is new Integer; > type Int_B is new Integer; > > type Int_A_Ptr is access all Int_A; > type Int_B_Ptr is access all Int_B; > > function X (Dummy : Integer) return Int_A_Ptr is > begin > Ada.Text_IO.Put_Line ("First interpretation"); > return null; > end X; > > function X (Dummy : Integer) return Int_B_Ptr is > begin > Ada.Text_IO.Put_Line ("Second interpretation"); > return null; > end X; > begin > X (1).all := 1; -- Ambiguous assignment > end Test; Rational messages: 10:36:17 *** X (1).all := 1; is ambiguous 10:36:17 *** X could be (in OVERLOAD) X 10:36:17 *** X could be (in OVERLOAD) X