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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bfa3bd0e1081a777 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: OA bug ? Date: 1999/06/21 Message-ID: <376EA582.418CEDC3@averstar.com>#1/1 X-Deja-AN: 492244336 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <929984465.815.34@news.remarQ.com> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-06-21T00:00:00+00:00 List-Id: Vladimir Olensky wrote: > ... OA compiles everything with no problem. > At a link time it gives an error: > t_ctld.obj : error LNK2005: t_ctld.t__acc_cleanup already defined in > t_ctld.obj tst_ctld_bug.exe : fatal error LNK1169: one or more multiply > defined symbols found > ------------------------- > > Examination of T_Ctld assembler listing gives the following: > > ;Listing of uninitialized data section ; > ; ; > 000000 t_ctld.t__acc_cleanup DB 32 DUP(?) ; > 000020 t_ctld.t__acc_cleanup DB 32 DUP(?) ; > > and this explains the above problem > ----- > 000000 corresponds to T_CA; > 000020 corresponds to T_A; This bug was reported on 4/23/97, assigned PTR 2043, and fixed on 5/12/97. The fix was released to our licensees on 5/26/97. I'm not sure when it made it into the OA release, but apparently after the "special edition" that you have was released. You might inquire whether there is a newer "special edition" available. The problem related to declaring both an access-to-T and an access-to-T'Class prior to the full definition for a controlled type T. -Tucker Taft stt@averstar.com > ============================== > > Changing T_ctld fixes the problem: > > with Ada.Finalization; > > package T_Ctld is > type T is new Ada.Finalization.Controlled with null record; > type T_A is access all T; > type T_CA is access all T'Class; > > end T_Ctld; > ----------------------------- > the same piece of assembler listing: > > ;Listing of uninitialized data section ; > ; ; > 000000 t_ctld.t_ca__acc_cleanup DB 32 DUP(?) ; > 000020 t_ctld.t_a__acc_cleanup DB 32 DUP(?) ; > > Here everything is OK and as a result there are no problems > building Tst_Ctld_bug. > ========================================= > > So it looks as OA special edition has some problems with > internal data representation for controlled types > with private part. As noted above, the problem related to declaring multiple access types prior to the full definition of the designated, controlled type. > With GNAT everything is OK. > > Any comments ? > > Regards. > > Vladimir Olensky -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA