comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: OA bug ?
Date: 1999/06/21
Date: 1999-06-21T00:00:00+00:00	[thread overview]
Message-ID: <376EA582.418CEDC3@averstar.com> (raw)
In-Reply-To: 929984465.815.34@news.remarQ.com

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




  reply	other threads:[~1999-06-21  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-21  0:00 OA bug ? Vladimir Olensky
1999-06-21  0:00 ` Tucker Taft [this message]
1999-06-22  0:00   ` Another OA bug ? (was Re: OA bug ?) czgrr
1999-06-23  0:00     ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox