comp.lang.ada
 help / color / mirror / Atom feed
* ANN: Simple components for Ada v3.9
@ 2010-07-11 20:52 Dmitry A. Kazakov
  2010-07-12 20:36 ` Dirk Heinrichs
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry A. Kazakov @ 2010-07-11 20:52 UTC (permalink / raw)


The library provides implementations of smart pointers, directed graphs,
sets, maps, stacks, tables, string editing, unbounded arrays, expression
analyzers, lock-free data structures, synchronization primitives (events,
race condition free pulse events, arrays of events, reentrant mutexes,
deadlock-free arrays of mutexes), pseudo-random non-repeating numbers,
symmetric encoding and decoding, IEEE 754 representations support. It grew
out of needs and does not pretend to be universal. Tables management and
strings editing are described in separate documents see Tables and Strings
edit. The library is kept conform to both Ada 95 and Ada 2005 language
standards.

   http://www.dmitry-kazakov.de/ada/components.htm

The version 3.9 has experimental packages for Debian and Fedora linux. Note
that due to gcc 4.4 bugs not all features are available. See release notes:

http://www.dmitry-kazakov.de/distributions/components_fedora.htm
http://www.dmitry-kazakov.de/distributions/components_debian.htm

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-11 20:52 ANN: Simple components for Ada v3.9 Dmitry A. Kazakov
@ 2010-07-12 20:36 ` Dirk Heinrichs
  2010-07-12 22:09   ` tonyg
  2010-07-13  7:55   ` Dmitry A. Kazakov
  0 siblings, 2 replies; 14+ messages in thread
From: Dirk Heinrichs @ 2010-07-12 20:36 UTC (permalink / raw)


Dmitry A. Kazakov wrote:

> The version 3.9 has experimental packages for Debian and Fedora linux.
> Note that due to gcc 4.4 bugs not all features are available. See release
> notes:
> 
> http://www.dmitry-kazakov.de/distributions/components_debian.htm

For which debian version are those packages? I assume "testing", because of 
gcc 4.4. OTOH you state that "APQ persistence layer is not supported because 
APQ is not yet packaged.", but APQ packages are available for "testing". So 
I'm a bit confused.

Bye...

	Dirk



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-12 20:36 ` Dirk Heinrichs
@ 2010-07-12 22:09   ` tonyg
  2010-07-13  8:06     ` Dmitry A. Kazakov
  2010-07-13  7:55   ` Dmitry A. Kazakov
  1 sibling, 1 reply; 14+ messages in thread
From: tonyg @ 2010-07-12 22:09 UTC (permalink / raw)


On Jul 12, 9:36 pm, Dirk Heinrichs <dirk.heinri...@online.de> wrote:
> Dmitry A. Kazakov wrote:
> > The version 3.9 has experimental packages for Debian and Fedora linux.
> > Note that due to gcc 4.4 bugs not all features are available. See release
> > notes:
>
> >http://www.dmitry-kazakov.de/distributions/components_debian.htm
>
> For which debian version are those packages? I assume "testing", because of
> gcc 4.4. OTOH you state that "APQ persistence layer is not supported because
> APQ is not yet packaged.", but APQ packages are available for "testing". So
> I'm a bit confused.
>
> Bye...
>
>         Dirk

I think this is because of the status of APQ rather than Dmitrys
code . I have used these component  recently to implement a database
in odbc and I have to say it is very good and does the job. As to
which version, just use the gpr file as part of your gnat-gps project
and it works very very nice.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-12 20:36 ` Dirk Heinrichs
  2010-07-12 22:09   ` tonyg
@ 2010-07-13  7:55   ` Dmitry A. Kazakov
  2010-07-13 12:45     ` Ludovic Brenta
  1 sibling, 1 reply; 14+ messages in thread
From: Dmitry A. Kazakov @ 2010-07-13  7:55 UTC (permalink / raw)


On Mon, 12 Jul 2010 22:36:09 +0200, Dirk Heinrichs wrote:

> Dmitry A. Kazakov wrote:
> 
>> The version 3.9 has experimental packages for Debian and Fedora linux.
>> Note that due to gcc 4.4 bugs not all features are available. See release
>> notes:
>> 
>> http://www.dmitry-kazakov.de/distributions/components_debian.htm
> 
> For which debian version are those packages? I assume "testing", because of 
> gcc 4.4.

Yes it is the "squeeze".

> OTOH you state that "APQ persistence layer is not supported because 
> APQ is not yet packaged.", but APQ packages are available for "testing". So 
> I'm a bit confused.

It wasn't there last time I looked for it. Do you have the package names
(bin and dev)? I will take a look.

P.S. In any case in order to use the persistent layer of Simple Components,
the gcc 4.4 must be fixed first. The current version has controlled types
broken and some other severe issues. Unfortunately it is too early to
switch from GNAT GPL 2009/10.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-12 22:09   ` tonyg
@ 2010-07-13  8:06     ` Dmitry A. Kazakov
  2010-07-13  8:37       ` tonyg
  2010-07-13 16:59       ` Warren
  0 siblings, 2 replies; 14+ messages in thread
From: Dmitry A. Kazakov @ 2010-07-13  8:06 UTC (permalink / raw)


On Mon, 12 Jul 2010 15:09:26 -0700 (PDT), tonyg wrote:

> On Jul 12, 9:36�pm, Dirk Heinrichs <dirk.heinri...@online.de> wrote:
>> Dmitry A. Kazakov wrote:
>>> The version 3.9 has experimental packages for Debian and Fedora linux.
>>> Note that due to gcc 4.4 bugs not all features are available. See release
>>> notes:
>>
>>>http://www.dmitry-kazakov.de/distributions/components_debian.htm
>>
>> For which debian version are those packages? I assume "testing", because of
>> gcc 4.4. OTOH you state that "APQ persistence layer is not supported because
>> APQ is not yet packaged.", but APQ packages are available for "testing". So
>> I'm a bit confused.
>>
>> Bye...
>>
>> � � � � Dirk
> 
> I think this is because of the status of APQ rather than Dmitrys
> code . I have used these component  recently to implement a database
> in odbc and I have to say it is very good and does the job. As to
> which version, just use the gpr file as part of your gnat-gps project
> and it works very very nice.

Thanks, but regarding APQ it might indeed be broken. Actually I ceased to
support APQ since GNAT 3.14, because APQ was not maintained. I happy to see
that Debian guys want to revive it.

Though I am very disappointed with the present status of DB support in Ada.
There are too many projects, bindings are too low level. None of them
attempt to make it platform independent. On the contrary, authors tend to
be as much DBMS dependent as possible. There was a discussion on this in
comp.lang.ada, people agreed to disagree.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-13  8:06     ` Dmitry A. Kazakov
@ 2010-07-13  8:37       ` tonyg
  2010-07-13 16:59       ` Warren
  1 sibling, 0 replies; 14+ messages in thread
From: tonyg @ 2010-07-13  8:37 UTC (permalink / raw)


On Jul 13, 9:06 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Mon, 12 Jul 2010 15:09:26 -0700 (PDT), tonyg wrote:
> > On Jul 12, 9:36 pm, Dirk Heinrichs <dirk.heinri...@online.de> wrote:
> >> Dmitry A. Kazakov wrote:
> >>> The version 3.9 has experimental packages for Debian and Fedora linux.
> >>> Note that due to gcc 4.4 bugs not all features are available. See release
> >>> notes:
>
> >>>http://www.dmitry-kazakov.de/distributions/components_debian.htm
>
> >> For which debian version are those packages? I assume "testing", because of
> >> gcc 4.4. OTOH you state that "APQ persistence layer is not supported because
> >> APQ is not yet packaged.", but APQ packages are available for "testing". So
> >> I'm a bit confused.
>
> >> Bye...
>
> >>         Dirk
>
> > I think this is because of the status of APQ rather than Dmitrys
> > code . I have used these component  recently to implement a database
> > in odbc and I have to say it is very good and does the job. As to
> > which version, just use the gpr file as part of your gnat-gps project
> > and it works very very nice.
>
> Thanks, but regarding APQ it might indeed be broken. Actually I ceased to
> support APQ since GNAT 3.14, because APQ was not maintained. I happy to see
> that Debian guys want to revive it.
>
> Though I am very disappointed with the present status of DB support in Ada.
> There are too many projects, bindings are too low level. None of them
> attempt to make it platform independent. On the contrary, authors tend to
> be as much DBMS dependent as possible. There was a discussion on this in
> comp.lang.ada, people agreed to disagree.
>
> --
> Regards,
> Dmitry A. Kazakovhttp://www.dmitry-kazakov.de

Totally - I found it very hard to find something useful, the odbc api
packages you wrote to use with your persistant objects proved very
useful though and I think they are probably the safest, most usable
and thickest binding ada programmers have available at the moment even
though it was originally written for your persistant objects. It
allows not so talented ada programmers like myself to use the gnade
ODBC binding which lets face it is a pretty intimidating if not
complicated beast.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-13  7:55   ` Dmitry A. Kazakov
@ 2010-07-13 12:45     ` Ludovic Brenta
  2010-07-13 16:35       ` Dmitry A. Kazakov
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Brenta @ 2010-07-13 12:45 UTC (permalink / raw)


Dmitry A. Kazakov wrote:
> On Mon, 12 Jul 2010 22:36:09 +0200, Dirk Heinrichs wrote:
>> Dmitry A. Kazakov wrote:
>
>>> The version 3.9 has experimental packages for Debian and Fedora linux.
>>> Note that due to gcc 4.4 bugs not all features are available. See release
>>> notes:
>
>>>http://www.dmitry-kazakov.de/distributions/components_debian.htm
>
>> For which debian version are those packages? I assume "testing", because of
>> gcc 4.4.
>
> Yes it is the "squeeze".
>
>> OTOH you state that "APQ persistence layer is not supported because
>> APQ is not yet packaged.", but APQ packages are available for "testing". So
>> I'm a bit confused.
>
> It wasn't there last time I looked for it. Do you have the package names
> (bin and dev)? I will take a look.

libapq1-dev (database-independent part)
libapq-postgresql1-dev (PostgreSQL-specific part)

Thanks to Adrian-Ken Rueegsegger for these packages. Unfortunately no
other database-specific bindings are in Debian yet.

> P.S. In any case in order to use the persistent layer of Simple Components,
> the gcc 4.4 must be fixed first. The current version has controlled types
> broken and some other severe issues.

Wow, that's a pretty grave problem; if what you say is true, a fix in
the stable GCC 4.4 branch is justified. What is the bugzilla number
for this bug?

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-13 12:45     ` Ludovic Brenta
@ 2010-07-13 16:35       ` Dmitry A. Kazakov
  2010-07-13 19:20         ` Simon Wright
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry A. Kazakov @ 2010-07-13 16:35 UTC (permalink / raw)


On Tue, 13 Jul 2010 05:45:11 -0700 (PDT), Ludovic Brenta wrote:

> Dmitry A. Kazakov wrote:
>> On Mon, 12 Jul 2010 22:36:09 +0200, Dirk Heinrichs wrote:
>>> Dmitry A. Kazakov wrote:
>>
>>>> The version 3.9 has experimental packages for Debian and Fedora linux.
>>>> Note that due to gcc 4.4 bugs not all features are available. See release
>>>> notes:
>>
>>>>http://www.dmitry-kazakov.de/distributions/components_debian.htm
>>
>>> For which debian version are those packages? I assume "testing", because of
>>> gcc 4.4.
>>
>> Yes it is the "squeeze".
>>
>>> OTOH you state that "APQ persistence layer is not supported because
>>> APQ is not yet packaged.", but APQ packages are available for "testing". So
>>> I'm a bit confused.
>>
>> It wasn't there last time I looked for it. Do you have the package names
>> (bin and dev)? I will take a look.
> 
> libapq1-dev (database-independent part)
> libapq-postgresql1-dev (PostgreSQL-specific part)

Thanks.

>> P.S. In any case in order to use the persistent layer of Simple Components,
>> the gcc 4.4 must be fixed first. The current version has controlled types
>> broken and some other severe issues.
> 
> Wow, that's a pretty grave problem; if what you say is true, a fix in
> the stable GCC 4.4 branch is justified. What is the bugzilla number
> for this bug?

There are several. For example this one:

with Ada.Finalization;
with Ada.Unchecked_Deallocation;
with Ada.Text_IO;

procedure Controlled_Array is
   type T is new Ada.Finalization.Limited_Controlled with record
      C : Natural := 0;
   end record;
   overriding procedure Finalize (X : in out T);

   procedure Finalize (X : in out T) is
   begin
      if X.C = 0 then
         Ada.Text_IO.Put_Line ("Successful finalization");
      else
         Ada.Text_IO.Put_Line ("Illegal count in finalization" &
Integer'Image (X.C));
         raise Program_Error;
      end if;
   end Finalize;

   type T_Ptr is access T'Class;
   type H is new Ada.Finalization.Controlled with record
      P : T_Ptr;
   end record;
   overriding procedure Finalize (X : in out H);
   overriding procedure Adjust (X : in out H);

   procedure Finalize (X : in out H) is
      procedure Free is new Ada.Unchecked_Deallocation (T'Class, T_Ptr);
   begin
      if X.P /= null then
         X.P.C := X.P.C - 1;
         if X.P.C = 0 then
            Free (X.P);
         end if;
      end if;
   end Finalize;
   procedure Adjust (X : in out H) is
   begin
      X.P.C := X.P.C + 1;
   end Adjust;

   type H_Array is array (Positive range <>) of H;

   function Create return H is
      Result : H;
   begin
      Result.P := new T;
      Result.P.C := 1;
      return Result;
   end Create;

   List  : H_Array := (Create, Create, Create);
   First : T_Ptr := List (List'First).P;
begin
   Ada.Text_IO.Put_Line ("Count" & Integer'Image (First.C));
end Controlled_Array;

Some others can be found in the Simple Components tests.

I am not sure if I posted any of them there. I did report to AdaCore. Most
of them were fixed prior GNAT GPL 2009 was published.

Is a merge with GPL 2009/10 planned? I am asking because I still don't
understand that complex mechanics governing FSF releases. In particular
merits of posting two-three years old bugs all fixed in GNAT GPL, like the
above bug.

I do have a base of bug reports I sent to AdaCore, but unfortunately I
cannot post most of them, because they contain proprietary code. Then, of
course, there are lots of bugs reported by other AdaCore customers. So my
uneducated guess, would rather be: let them do the merge first, and then
we'll see.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-13  8:06     ` Dmitry A. Kazakov
  2010-07-13  8:37       ` tonyg
@ 2010-07-13 16:59       ` Warren
  1 sibling, 0 replies; 14+ messages in thread
From: Warren @ 2010-07-13 16:59 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1707 bytes --]

Dmitry A. Kazakov expounded in
news:jxughzsu2k7.fihzowngjkpt.dlg@40tude.net: 

> On Mon, 12 Jul 2010 15:09:26 -0700 (PDT), tonyg wrote:
>> On Jul 12, 9:36�pm, Dirk Heinrichs <dirk.heinri...@online.de> wrote:
>>> Dmitry A. Kazakov wrote:
>>>> The version 3.9 has experimental packages for Debian and Fedora
>>>> linux. Note that due to gcc 4.4 bugs not all features are
>>>> available. See release notes:
>>>
>>>>http://www.dmitry-kazakov.de/distributions/components_debian.htm
>>>
>>> For which debian version are those packages? I assume "testing",
>>> because of gcc 4.4. OTOH you state that "APQ persistence layer is
>>> not supported because APQ is not yet packaged.", but APQ packages
>>> are available for "testing". So I'm a bit confused.

>> I think this is because of the status of APQ rather than Dmitrys
>> code . I have used these component  recently to implement a database
>> in odbc and I have to say it is very good and does the job. As to
>> which version, just use the gpr file as part of your gnat-gps project
>> and it works very very nice.
> 
> Thanks, but regarding APQ it might indeed be broken. Actually I ceased
> to support APQ since GNAT 3.14, because APQ was not maintained. I
> happy to see that Debian guys want to revive it.

I believe that Marcelo Cora�a de Freitas is still maintaining APQ. I
passed the reins over him some time ago and he has since moved his 
support to the following site AFAIK:

http://framework.kow.com.br/projects/show/apq

The original (now unmaintained) site was/is here:

https://sourceforge.net/projects/apq

I just ran out of time to keep it up myself. In fact, <cough>,
I even gave up on Ada for a few years.. but I'm back now. ;-)

Warren



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-13 16:35       ` Dmitry A. Kazakov
@ 2010-07-13 19:20         ` Simon Wright
  2010-07-13 19:55           ` Dmitry A. Kazakov
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Wright @ 2010-07-13 19:20 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Tue, 13 Jul 2010 05:45:11 -0700 (PDT), Ludovic Brenta wrote:

>>> P.S. In any case in order to use the persistent layer of Simple Components,
>>> the gcc 4.4 must be fixed first. The current version has controlled types
>>> broken and some other severe issues.
>> 
>> Wow, that's a pretty grave problem; if what you say is true, a fix in
>> the stable GCC 4.4 branch is justified. What is the bugzilla number
>> for this bug?
>
> There are several. For example this one:

With GCC 4.5.0 and with GNAT GPL 2010 (both on Mac OS X Snow Leopard)
this program produces

   $ ./controlled_array
   Count 1
   Successful finalization
   Successful finalization
   Successful finalization

With GNAT GPL 2010, -gnat05 is required:

   GNATMAKE GPL 2010 (20100603)
   Copyright (C) 1995-2010, Free Software Foundation, Inc.
   gcc -c -O2 controlled_array.adb
   controlled_array.adb:9:04: overriding indicator is an Ada 2005 extension
   controlled_array.adb:9:04: unit must be compiled with -gnat05 switch
   controlled_array.adb:26:04: overriding indicator is an Ada 2005 extension
   controlled_array.adb:26:04: unit must be compiled with -gnat05 switch
   controlled_array.adb:27:04: overriding indicator is an Ada 2005 extension
   controlled_array.adb:27:04: unit must be compiled with -gnat05 switch
   End of compilation



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-13 19:20         ` Simon Wright
@ 2010-07-13 19:55           ` Dmitry A. Kazakov
  2010-07-14 14:54             ` Ludovic Brenta
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry A. Kazakov @ 2010-07-13 19:55 UTC (permalink / raw)


On Tue, 13 Jul 2010 20:20:00 +0100, Simon Wright wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> 
>> On Tue, 13 Jul 2010 05:45:11 -0700 (PDT), Ludovic Brenta wrote:
> 
>>>> P.S. In any case in order to use the persistent layer of Simple Components,
>>>> the gcc 4.4 must be fixed first. The current version has controlled types
>>>> broken and some other severe issues.
>>> 
>>> Wow, that's a pretty grave problem; if what you say is true, a fix in
>>> the stable GCC 4.4 branch is justified. What is the bugzilla number
>>> for this bug?
>>
>> There are several. For example this one:
> 
> With GCC 4.5.0 and with GNAT GPL 2010 (both on Mac OS X Snow Leopard)
> this program produces
> 
>    $ ./controlled_array
>    Count 1
>    Successful finalization
>    Successful finalization
>    Successful finalization

This is how it should be.

Debian's or Fedora's gcc 4.4 spits:

Count 2
Illegal count in finalization 1

raised PROGRAM_ERROR : adjust/finalize raised PROGRAM_ERROR:
controlled_array.adb:18 explicit raise

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ANN: Simple components for Ada v3.9
  2010-07-13 19:55           ` Dmitry A. Kazakov
@ 2010-07-14 14:54             ` Ludovic Brenta
  2010-08-03 17:44               ` GNAT bug: array aggregate containing controlled objects (was: ANN: Simple components for Ada v3.9) Ludovic Brenta
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Brenta @ 2010-07-14 14:54 UTC (permalink / raw)


Dmitry A. Kazakov wrote on comp.lang.ada:
> On Tue, 13 Jul 2010 20:20:00 +0100, Simon Wright wrote:
>> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> writes:
>>> On Tue, 13 Jul 2010 05:45:11 -0700 (PDT), Ludovic Brenta wrote:
>>>>> P.S. In any case in order to use the persistent layer of Simple Components,
>>>>> the gcc 4.4 must be fixed first. The current version has controlled types
>>>>> broken and some other severe issues.
>>>>
>>>> Wow, that's a pretty grave problem; if what you say is true, a fix in
>>>> the stable GCC 4.4 branch is justified. What is the bugzilla number
>>>> for this bug?
>>>
>>> There are several. For example this one:
>>
>> With GCC 4.5.0 and with GNAT GPL 2010 (both on Mac OS X Snow Leopard)
>> this program produces
>>
>>    $ ./controlled_array
>>    Count 1
>>    Successful finalization
>>    Successful finalization
>>    Successful finalization
>
> This is how it should be.
>
> Debian's or Fedora's gcc 4.4 spits:
>
> Count 2
> Illegal count in finalization 1
>
> raised PROGRAM_ERROR : adjust/finalize raised PROGRAM_ERROR:
> controlled_array.adb:18 explicit raise


Looks like this might be the patch that corrects this bug:

2009-04-17 Thomas Quinot <quinot@adacore.com>

	* exp_ch7.adb (Expand_Ctrl_Function_Call): Remove incorrect special
	case for the case of an aggregate component, the attach call for the
	result is actually needed.

	* exp_aggr.adb (Backend_Processing_Possible): Backend processing for
	an array aggregate must be disabled if the component type requires
	controlled actions.

	* exp_ch3.adb: Minor reformatting

I'll add a backport of this patch to my long TODO list.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* GNAT bug: array aggregate containing controlled objects (was: ANN: Simple components for Ada v3.9)
  2010-07-14 14:54             ` Ludovic Brenta
@ 2010-08-03 17:44               ` Ludovic Brenta
  2010-08-03 19:28                 ` GNAT bug: array aggregate containing controlled objects Dmitry A. Kazakov
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Brenta @ 2010-08-03 17:44 UTC (permalink / raw)


I wrote on comp.lang.ada:
> Dmitry A. Kazakov wrote on comp.lang.ada:
>> On Tue, 13 Jul 2010 20:20:00 +0100, Simon Wright wrote:
>>> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> writes:
>>>> On Tue, 13 Jul 2010 05:45:11 -0700 (PDT), Ludovic Brenta wrote:
>>>>>> P.S. In any case in order to use the persistent layer of Simple Components,
>>>>>> the gcc 4.4 must be fixed first. The current version has controlled types
>>>>>> broken and some other severe issues.
>>>>>
>>>>> Wow, that's a pretty grave problem; if what you say is true, a fix in
>>>>> the stable GCC 4.4 branch is justified. What is the bugzilla number
>>>>> for this bug?
>>>>
>>>> There are several. For example this one:
>>>
>>> With GCC 4.5.0 and with GNAT GPL 2010 (both on Mac OS X Snow Leopard)
>>> this program produces
>>>
>>>    $ ./controlled_array
>>>    Count 1
>>>    Successful finalization
>>>    Successful finalization
>>>    Successful finalization
>>
>> This is how it should be.
>>
>> Debian's or Fedora's gcc 4.4 spits:
>>
>> Count 2
>> Illegal count in finalization 1
>>
>> raised PROGRAM_ERROR : adjust/finalize raised PROGRAM_ERROR:
>> controlled_array.adb:18 explicit raise
>
>
> Looks like this might be the patch that corrects this bug:
>
> 2009-04-17 Thomas Quinot <quinot@adacore.com>
>
> 	* exp_ch7.adb (Expand_Ctrl_Function_Call): Remove incorrect special
> 	case for the case of an aggregate component, the attach call for the
> 	result is actually needed.
>
> 	* exp_aggr.adb (Backend_Processing_Possible): Backend processing for
> 	an array aggregate must be disabled if the component type requires
> 	controlled actions.
>
> 	* exp_ch3.adb: Minor reformatting
>
> I'll add a backport of this patch to my long TODO list.


The backport actually worked and the compiler in Debian unstable is now
fixed.  The fix will migrate to testing in a few days.  Thank you for
reporting.

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: GNAT bug: array aggregate containing controlled objects
  2010-08-03 17:44               ` GNAT bug: array aggregate containing controlled objects (was: ANN: Simple components for Ada v3.9) Ludovic Brenta
@ 2010-08-03 19:28                 ` Dmitry A. Kazakov
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry A. Kazakov @ 2010-08-03 19:28 UTC (permalink / raw)


On Tue, 03 Aug 2010 19:44:50 +0200, Ludovic Brenta wrote:

> I wrote on comp.lang.ada:
>> Dmitry A. Kazakov wrote on comp.lang.ada:
>>> On Tue, 13 Jul 2010 20:20:00 +0100, Simon Wright wrote:
>>>> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> writes:
>>>>> On Tue, 13 Jul 2010 05:45:11 -0700 (PDT), Ludovic Brenta wrote:
>>>>>>> P.S. In any case in order to use the persistent layer of Simple Components,
>>>>>>> the gcc 4.4 must be fixed first. The current version has controlled types
>>>>>>> broken and some other severe issues.
>>>>>>
>>>>>> Wow, that's a pretty grave problem; if what you say is true, a fix in
>>>>>> the stable GCC 4.4 branch is justified. What is the bugzilla number
>>>>>> for this bug?
>>>>>
>>>>> There are several. For example this one:
>>>>
>>>> With GCC 4.5.0 and with GNAT GPL 2010 (both on Mac OS X Snow Leopard)
>>>> this program produces
>>>>
>>>> � �$ ./controlled_array
>>>> � �Count 1
>>>> � �Successful finalization
>>>> � �Successful finalization
>>>> � �Successful finalization
>>>
>>> This is how it should be.
>>>
>>> Debian's or Fedora's gcc 4.4 spits:
>>>
>>> Count 2
>>> Illegal count in finalization 1
>>>
>>> raised PROGRAM_ERROR : adjust/finalize raised PROGRAM_ERROR:
>>> controlled_array.adb:18 explicit raise
>>
>>
>> Looks like this might be the patch that corrects this bug:
>>
>> 2009-04-17 Thomas Quinot <quinot@adacore.com>
>>
>> 	* exp_ch7.adb (Expand_Ctrl_Function_Call): Remove incorrect special
>> 	case for the case of an aggregate component, the attach call for the
>> 	result is actually needed.
>>
>> 	* exp_aggr.adb (Backend_Processing_Possible): Backend processing for
>> 	an array aggregate must be disabled if the component type requires
>> 	controlled actions.
>>
>> 	* exp_ch3.adb: Minor reformatting
>>
>> I'll add a backport of this patch to my long TODO list.
> 
> 
> The backport actually worked and the compiler in Debian unstable is now
> fixed.  The fix will migrate to testing in a few days.  Thank you for
> reporting.

Great news, thank you.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-08-03 19:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-11 20:52 ANN: Simple components for Ada v3.9 Dmitry A. Kazakov
2010-07-12 20:36 ` Dirk Heinrichs
2010-07-12 22:09   ` tonyg
2010-07-13  8:06     ` Dmitry A. Kazakov
2010-07-13  8:37       ` tonyg
2010-07-13 16:59       ` Warren
2010-07-13  7:55   ` Dmitry A. Kazakov
2010-07-13 12:45     ` Ludovic Brenta
2010-07-13 16:35       ` Dmitry A. Kazakov
2010-07-13 19:20         ` Simon Wright
2010-07-13 19:55           ` Dmitry A. Kazakov
2010-07-14 14:54             ` Ludovic Brenta
2010-08-03 17:44               ` GNAT bug: array aggregate containing controlled objects (was: ANN: Simple components for Ada v3.9) Ludovic Brenta
2010-08-03 19:28                 ` GNAT bug: array aggregate containing controlled objects Dmitry A. Kazakov

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