comp.lang.ada
 help / color / mirror / Atom feed
* Ada.Containers.Indefinite_Ordered_Maps of gcc 4.0.1 has bug ?
@ 2005-08-06 11:57 Y.Tomino
  2005-08-06 12:54 ` Matthew Heaney
  0 siblings, 1 reply; 7+ messages in thread
From: Y.Tomino @ 2005-08-06 11:57 UTC (permalink / raw)


Hello.

Ada.Containers.Indefinite_Ordered_Maps.Adjust seems to me having bug.
Although good if it's my misunderstanding.

pragma Ada_05;
with Ada.Containers.Indefinite_Ordered_Maps;
package M is new Ada.Containers.Indefinite_Ordered_Maps(String, String);

pragma Ada_05;
with Ada.Text_IO; use Ada.Text_IO;
with m; use M;
procedure Test1 is
   X, Y : Map;
begin
   X.Include("a", "1");
   Put_Line(Element(X, "a")); -- "1" OK
   Y := X;
   Put_Line(Element(Y, "a")); -- "1" OK
   Clear(X);
   Put_Line(Element(Y, "a"));
   -- raised CONSTRAINT_ERROR : a-ciorma.adb:407 access check failed !?
end Test1;

pragma Ada_05;
with Ada.Text_IO; use Ada.Text_IO;
with m; use M;
procedure Test2 is
   function X return Map is
      R : Map;
   begin
      R.Include("a", "1");
      return R;
   end X;
   Y : Map := X;
begin
   Put_Line(Element(Y, "a"));
   -- raised CONSTRAINT_ERROR : a-ciorma.adb:407 access check failed !?
end Test2;

YT



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

end of thread, other threads:[~2005-08-06 16:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-06 11:57 Ada.Containers.Indefinite_Ordered_Maps of gcc 4.0.1 has bug ? Y.Tomino
2005-08-06 12:54 ` Matthew Heaney
2005-08-06 13:13   ` Y.Tomino
     [not found]   ` <42F4B753.2080004@panathenaia.halfmoon.jp>
2005-08-06 15:37     ` Matthew Heaney
2005-08-06 16:17       ` Y.Tomino
2005-08-06 16:33         ` Matthew Heaney
2005-08-06 16:49           ` Y.Tomino

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