comp.lang.ada
 help / color / mirror / Atom feed
* Optimizing with gnat
@ 1996-07-04  0:00 fernando marcano
  1996-07-05  0:00 ` Robert Dewar
  1996-07-05  0:00 ` Robert Dewar
  0 siblings, 2 replies; 3+ messages in thread
From: fernando marcano @ 1996-07-04  0:00 UTC (permalink / 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                 ||
\\--------------------------------------//






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Optimizing with gnat
  1996-07-04  0:00 Optimizing with gnat fernando marcano
@ 1996-07-05  0:00 ` Robert Dewar
  1996-07-05  0:00 ` Robert Dewar
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1996-07-05  0:00 UTC (permalink / raw)



iRegarding Fernando's question regarding a mysterious error message
from the use of -gnatp to suppress checks. This is most certainly
a GNAT bug, since there is no legitimate circumstance in which use
of the -gnatp switch can cause an error message. So if that happens
you have found a bug (it comes from expanded code undoubtedly, you
can probably see what is happenning if you use the -gnatdg switch to
expand the generated code).

Anyway, what do you do when you find a GNAT bug?
YOU SEND IT TO report@gnat.com!
At least that's what you do if you want the folks who know most about
GNAT to look at it :-)

I also note that 3.03 is two versions out of date now, so it is possible
that this bug is already fixed in the latest released version.

Anyway, if you find a GNAT bug, or if you just have some mystery like this
where you are not sure if it is a bug or not, please send it along to
report@gnat.com. If you are an unsupported user, we can't promise any
immediate response, but all bugs get looked at eventually, and sometimes
we can indeed provide an immediate answer pointing out something that
you have done wrong.

Robert Dewar
Ada Core Technologies





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Optimizing with gnat
  1996-07-04  0:00 Optimizing with gnat fernando marcano
  1996-07-05  0:00 ` Robert Dewar
@ 1996-07-05  0:00 ` Robert Dewar
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1996-07-05  0:00 UTC (permalink / raw)



Fernando said

"PD. Sorry for the lenght of the message, but I don't know which amount of
information is necessary... :-)"

In fact the full information *is* absolutely necessary (including full
sources, version of GNAT you are using, and machine/system you are 
using, as well as an exact description  of what happened). Your bug
report is just fine, but it needs to go to report@gnat.com for us to
look at it at ACT, we don't take bug reports directly from CLA.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-07-05  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-04  0:00 Optimizing with gnat fernando marcano
1996-07-05  0:00 ` Robert Dewar
1996-07-05  0:00 ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox