+===========================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