comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
To: Stephen Arnold <arnold.steve@ensco.com>
Subject: Re: GNAT implementation bug? (or my code)
Date: 2000/04/14
Date: 2000-04-14T21:40:43+00:00	[thread overview]
Message-ID: <38F79059.27632CBE@averstar.com> (raw)
In-Reply-To: 38F5EC37.DED92CDE@ensco.com

Stephen Arnold wrote:
> 
> Howdy all:
> 
> I'm just learning Ada, so this could easily be own code barfing, but it
> seems like there's a bug in GNAT (Linux or win32).  I'm using 3.12p on
> both platforms (win9x and RH6.1), and the code seems to run fine on
> winNT as well.
> 
> This is a homework assignment, and it passes both my test driver and the
> instructor's test driver on win32, however, I get the following error on
> my RH6.1 (kernel 2.2.12, stock install) partition:
> ...

It compiles and works fine on our Solaris AdaMagic Ada95 compiler.
See the output below.

One possibility might be that the default stack size on the
GNAT run-time system on RH6.1 is insufficient for your test.

> ...
> > Dequeued item:  4
> > Dequeued item:  3
> > Something is terribly wrong. There was as unanticipated exception:
> > STORAGE_ERROR
> > stack overflow (or erroneous memory access)
-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA

----------- output from q_test ---------

Testing Count and Empty.
Creating empty queues...
Count(A) =  0
Count(B) =  0
Count(C) =  0

Checking empty status...
Empty(A) = TRUE
Empty(B) = TRUE
Empty(C) = TRUE
Empty(D) = TRUE

Adding known values to A and dequeueing them.
Dequeued item:  17
Dequeued item:  13
Dequeued item:  11
Dequeued item:  10
Dequeued item:  8
Dequeued item:  4
Dequeued item:  3
Dequeued item:  1

Testing Enqueue, Dequeue, and Front.
Filling other queues with 8 random integers...

Checking contents of B.
The number queued was:  1
The front of the queue is:  1
The number queued was:  16
The front of the queue is:  16
The number queued was:  14
The front of the queue is:  16
The number queued was:  12
The front of the queue is:  16
The number queued was:  8
The front of the queue is:  16
The number queued was:  3
The front of the queue is:  16
The number queued was:  15
The front of the queue is:  16
The number queued was:  10
The front of the queue is:  16

Dequeueing two values of B.
The first number dequeued was:  16
The second number dequeued was:  15

Count(A) =  0
Count(B) =  6
Count(C) =  8
Count(D) =  8

Is B = C?  FALSE
Is B = B?  TRUE
Is C = D?  FALSE

Clearing D.
Count(D) =  0

Beginning exception tests...
Getting item from front of D...
The exception was: Q_Test.Q.Underflow
The exception message is: Error using Front.  Queue is empty.
Front test passed.

Dequeueing item of D.
The exception was: Q_Test.Q.Underflow
The exception message is: Error using Dequeue.  Queue is empty.
Dequeue test passed.




       reply	other threads:[~2000-04-14  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <38F5EC37.DED92CDE@ensco.com>
2000-04-14  0:00 ` Tucker Taft [this message]
2000-04-14  0:00   ` GNAT implementation bug? (or my code) Stephen Arnold
2000-04-15  0:00     ` Robert Dewar
2000-04-16  0:00       ` Simon Wright
replies disabled

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