From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6e10dbd84b94a267 X-Google-Attributes: gid103376,public From: njt@minster.york.ac.uk (Nigel J. Tracey) Subject: GNAT Compilation Problems Date: 1996/09/20 Message-ID: <51u63c$80c@netty.york.ac.uk>#1/1 X-Deja-AN: 184182891 organization: Dept. Computer Science, University of York. newsgroups: comp.lang.ada Date: 1996-09-20T00:00:00+00:00 List-Id: I am having problems with compiling the below code using GNAT 3.05 on Linux 2.0.20 I have identified the line which causes the problem but do not know why. With the program as it stands I get a the following: gcc: Internal compiler error: program gnat1 got fatal signal 11 The line which seems to cause the problem is higlighed below as -- ***************** With this line commented out, things seem to compile fine. This line is however vitial!!! :) Any help would be much appreciated. (Please also e-mail replies) Thanks a lot, Nigel -------------------- Nigel J. Tracey MEng, Research Associate (High Integrity Systems Group). Department of Computer Science, Office: X/D016 University of York, Tel : [0|+44]1904 432769 York, England. E-Mail: njt@minster.york.ac.uk YO1 5DD. URL : http://sv1pc161.cs.york.ac.uk/~njt with Lists; with String_Pkg; with TEXT_IO; use TEXT_IO; procedure variant is type Basic_Type is (NONE, ENUM, INT, BOOL, FLOAT_NUM, FIXED_NUM, CHAR); type Type_Information_Type(Base_Type : Basic_Type := NONE) is record Type_Name : String_Pkg.String_Type; case Base_Type is when INT | CHAR | ENUM => Min_Integer : Integer; Max_Integer : Integer; when BOOL => null; when FLOAT_NUM => Float_Precision : Integer; Min_Float : Float; Max_Float : Float; when FIXED_NUM => Fixed_Precision : Float; Min_Fixed : Float; Max_Fixed : Float; when NONE => null; end case; end record; package Type_List is new Lists(Type_Information_Type); TypeLst : Type_List.List; Standard_Ada_Types : constant array(1..4) of Type_Information_Type := ((INT, String_pkg.Create("Integer"), -2147483647, 2147483647), (BOOL, String_pkg.Create("Boolean")), (FLOAT_NUM, String_pkg.Create("Float"), 6, -3.40282E+38, 3.40282E+38), (INT, String_pkg.Create("Character"), 0, 255)); procedure Add_Subtype (Type_Name : String_Pkg.String_Type; Subtype_Name : String_Pkg.String_Type) is List_Iterator : Type_List.ListIter; Temp : Type_Information_Type; begin List_Iterator := Type_List.MakeListIter(TypeLst); while Type_List.More(List_Iterator) loop -- ************************ -- The line below causes the problems -- ************************ Type_List.Next(List_Iterator, Temp); if String_Pkg.Equal(Temp.Type_Name, Subtype_Name) then Temp.Type_Name := Type_Name; Type_List.Attach(TypeLst, Temp); return; end if; end loop; end Add_Subtype; begin TypeLst := Type_List.Create; for Counter in Standard_Ada_Types'Range loop Type_List.Attach(TypeLst, Standard_Ada_Types(Counter)); end loop; end Variant;