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.4 required=5.0 tests=BAYES_50,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,16222f725bc81dfe,start X-Google-Attributes: gid103376,public From: fernando marcano Subject: Optimizing with gnat Date: 1996/07/04 Message-ID: #1/1 X-Deja-AN: 163765638 organization: University of BC, Dept. of Electrical Engineering content-type: TEXT/PLAIN; charset=US-ASCII mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-07-04T00:00:00+00:00 List-Id: Hi there: Has anyone found problem with the optimizing switches of gnat? I have the GNAT Compiler Version 3.03. When trying to optimize the compilation for speed, I found the following error, which does not show if I compile without the -gnatp switch. Here is a copy of the command line C:\Power\Marcano\Ada\Simv03>gcc -c -gnatp -O3 -gnatv simula.adb GNAT Compiler Version 3.03 Copyright 1995 Free Software Foundation, Inc. Compiling: simula.adb (source file time stamp: 1996-06-28 19:16:00) 375. LumpedElements.UpdateHistSrc(elem => elemArray(elem)); | >>> prefix of "Constrained" attribute must be object 413 lines: 1 error C:\Power\Marcano\Ada\Simv03> elemArray is dinamically allocated by: elemArray : ptrElementsArray; ... elemArray := new typElementsArray(1..nElem); The type typElementsArray is declared as: type typElementsArray is array(integer range <>) of LumpedElements.typLumpedElem; type ptrElementsArray is access typElementsArray; And the type typLumpedElem is defined as: package LumpedElements is type typElem is (Resistance, Inductance, Capacitance); type typLumpedElem(elemType : typElem := Resistance) is private; type ptrLumpedElem is access typLumpedElem; ... private type typLumpedElem(elemType : typElem := Resistance) is record ... case elemType is when Inductance | Capacitance => ... when Resistance => null; end case; end record; end LumpedElements; Does anyone know what this error means, and why it doesn't show when I compile without the -gnatp switch?, also, I have other structures that are similar to this but they don't produce error. Please tell em if you need more information about the program in order to find the problem, but an explanation of what the error means will be very helpful Thank very much in advance for your help Fernando PD. Sorry for the lenght of the message, but I don't know which amount of information is necessary... :-) //--------------------------------------\\ || Fernando Jose Marcano Diaz || | || marcano@ee.ubc.ca || | The most lively thought || The University of British Columbia || | still is inferior to the || Department of Electrical Engineering || | dullest sensation || 2356 Main Mall || | || Vancouver, B.C. || | David Hume || Canada || | || V6T 1Z4 || \\--------------------------------------//