[Bug ada/29015] Ada 2005 observer pattern with mutually dependent packages and containers produces compiler error

2008-04-09 Thread laguest at archangeli dot demon dot co dot uk


--- Comment #5 from laguest at archangeli dot demon dot co dot uk  
2008-04-09 19:45 ---
This is still a problem on 4.4.0 trunk.

Luke.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29015



[Bug ada/33071] New: Ada 2005 ICE on limited with'ing

2007-08-14 Thread laguest at archangeli dot demon dot co dot uk
+===GNAT BUG DETECTED==+
| 4.1.2 (Ubuntu 4.1.2-0ubuntu4) (x86_64-pc-linux-gnu) Assert_Failure
sinfo.adb:351|
| Error detected at status_bar.ads:14:3|
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc-4.1 or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+


-- Tutorial to show the usage of limited with in Ada 2005.
-- Copyright (C) 2007 Luke A. Guest
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see http://www.gnu.org/licenses/.

with Status_Bar;

package Window is

  type Window_Type is tagged private;

  procedure Add_Status_Bar(
Self : in out Window_Type;
Bar  : in Status_Bar.Status_Bar_Type);

private

  type Window_Type is tagged
record
  Bar : Status_Bar.Status_Bar_Type;
end record;

end Window;

with Ada.Text_IO;

package body Window is

  procedure Add_Status_Bar(
Self : in out Window_Type;
Bar  : in Status_Bar.Status_Bar_Type) is

  begin

Self.Bar := Bar;

--Status_Bar.Set_Parent(Bar, Self'Access);

Ada.Text_IO.Put_Line(Add_Status_Bar);

  end Add_Status_Bar;

end Window;

limited with Window;

package Status_Bar is

  type Status_Bar_Type is tagged private;

  procedure Set_Parent(
Self   : in Status_Bar_Type;
Parent : access Window.Window_Type'Class);

private

  type Status_Bar_Type is tagged
record
  Parent : access Window.Window_Type'Class;
end record;

end Status_Bar;

with Ada.Text_IO;

package body Status_Bar is

  procedure Set_Parent(
Self   : in Status_Bar_Type;
Parent : access Window.Window_Type'Class) is

  begin

Ada.Text_IO.Put_Line(Set_Parent);

Self.Parent := Parent;

  end Set_Parent;

end Status_Bar;

with Window;
with Status_Bar;

procedure Test is

  Frame : aliased Window.Window_Type;
  Bar   : Status_Bar.Status_Bar_Type;

begin

  Window.Add_Status_Bar(Frame, Bar);

end Test;


-- 
   Summary: Ada 2005 ICE on limited with'ing
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: laguest at archangeli dot demon dot co dot uk
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33071



[Bug ada/29015] Ada 2005 observer pattern with mutually dependent packages and containers produces compiler error

2006-09-18 Thread laguest at archangeli dot demon dot co dot uk


--- Comment #2 from laguest at archangeli dot demon dot co dot uk  
2006-09-18 16:11 ---
Seems this was an error based on the use of a limited view of a type. I don't
know whether this is actually allowed in the Ada 2005 standard, i.e passing a
reference to a limited view to a container? Should this bug be left open?

Luke.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29015



[Bug ada/29015] Ada 2005 observer pattern with mutually dependent packages and containers produces compiler error

2006-09-17 Thread laguest at archangeli dot demon dot co dot uk


--- Comment #1 from laguest at archangeli dot demon dot co dot uk  
2006-09-17 19:42 ---
Using the current SVN source (17/09/06) I get a slightly different error (with
the same source):

gcc -c -gnat05 test_observers.adb
+===GNAT BUG DETECTED==+
| 4.2.0 20060917 (experimental) (i686-pc-linux-gnu) Assert_Failure
atree.adb:812|
| Error detected at subjects.ads:17:3  |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

test_observers.adb
my_observer.ads
observers.ads
subjects.ads

compilation abandoned
gnatmake: test_observers.adb compilation error


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29015