This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/22270] New: Assert_Failure sinfo.adb:2479 instead of meaningful error message
- From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2005 16:28:19 -0000
- Subject: [Bug ada/22270] New: Assert_Failure sinfo.adb:2479 instead of meaningful error message
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A missing procedure declaration in test.ads causes test.adb to generate an
ice. Compiler output is:
+===========================GNAT BUG DETECTED==============================+
| 3.4.2 20040901 (prerelease) (i686-pc-linux-gnu) Assert_Failure sinfo.adb:2479|
| Error detected at test.adb:27:16 |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html. |
| 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.adb
test.ads
compilation abandoned
The two files test.adb and test.ads are listed below. The preprocessor
output is silly in this case.
Environment:
System: Linux walsh.cs 2.4.20-ac2 #11 Wed Mar 19 14:16:50 EST 2003 i686 i686 i386 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/kwalsh/work/gnu_3.4/gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --prefix=/opt/ada --enable-libada --enable-libgcj --enable-java-gc=boehm --enable-threads --enable-interpreter --enable-hash-synchronization --enable-shared --enable-languages=ada,c,c++,objc,f77,java
How-To-Repeat:
---- test.adb -------------------------------------------------------
with Ada.Unchecked_Deallocation;
package body test is
protected body Safe_Object is
procedure Add (Increment : in Integer := 1) is
begin
Val := Val + Increment;
end Add;
procedure Destroy_Stuff is
begin
Val := 0;
end Destroy_Stuff;
end Safe_Object;
procedure Add (This : in out Object; Increment : in Integer := 1) is
begin
This.Safe.Add (Increment);
end Add;
procedure Finalize (This : in out Object) is
begin
This.Safe.Destroy_Stuff ;
end Finalize;
end test;
---- test.ads -------------------------------------------------------
with Ada.Finalization;
use Ada;
package test is
type Object is limited private;
procedure Add (This : in out Object; Increment : in Integer := 1);
private
protected type Safe_Object (Parent : access Object) is
procedure Add (Increment : in Integer := 1);
--procedure Destroy_Stuff;
private
Val : aliased Integer;
end Safe_Object;
type Object is new Finalization.Limited_Controlled with record
Safe : Safe_Object (Object'Access);
end record;
procedure Finalize (This : in out Object);
end test;
------- Additional Comments From kwalsh at cs dot cornell dot edu 2005-07-01 16:28 -------
Fix:
Add the missing declaration (Destroy_Stuff, in this case) to the ads file.
--
Summary: Assert_Failure sinfo.adb:2479 instead of meaningful
error message
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kwalsh at cs dot cornell dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22270