From: fernando marcano <marcano@grunge.ee.ubc.ca>
Subject: Optimizing with gnat
Date: 1996/07/04
Date: 1996-07-04T00:00:00+00:00 [thread overview]
Message-ID: <Pine.SUN.3.91.960704180428.1845A-100000@grunge.ee.ubc.ca> (raw)
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 ||
\\--------------------------------------//
next reply other threads:[~1996-07-04 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-04 0:00 fernando marcano [this message]
1996-07-05 0:00 ` Optimizing with gnat Robert Dewar
1996-07-05 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox