comp.lang.ada
 help / color / mirror / Atom feed
* Error in gnat-4.6  (opensuse 11.4) ?
@ 2011-03-17 13:33 reinkor
  2011-03-17 14:34 ` Simon Wright
  0 siblings, 1 reply; 3+ messages in thread
From: reinkor @ 2011-03-17 13:33 UTC (permalink / raw)


Hello there,

I did strip down my program to the following (below) in order to
communicate
a possible error in gnat-4.6 (I use opensuse 11.4 on an hp Elitebook
6930p).
Could anybody try the same?

I get the following (test1.adb is listed below):

gnatmake -gnat2012 test1.adb
gcc -c -gnat2012 test1.adb
gnatbind -x test1.ali
gnatlink test1.ali
aaa > ./test1

raised STORAGE_ERROR : stack overflow (or erroneous memory access)

If I change:   "type Real is Digits 16;"  ->  "type Real is Digits
15;"
then I do not get "stack overflow".  Similarly, if I comment out for
example the statement " fe,xe : fe_t;"

reinert


------------------program listing-----------------
with Text_IO;
use  Text_IO;

with Ada.Numerics.Float_Random;
use  Ada.Numerics.Float_Random;
use  Ada.Numerics;

procedure test1 is

   type Real is Digits 16;

   G : Float_Random.Generator;

   type f_t  is array(1..0400) of Real;
   type fe_t is array(1..1000) of Real;

   type Node_t is
     record
        f, fm : f_t;
        fe,xe : fe_t;
        x  : Real;
     end record;

   Node : array (1..200) of Node_t;

   procedure initiate_nodes is
   begin
      for i in Node'range loop
          Node(i).x := Real(Float_Random.Random(Gen => G));
      end loop;
   end initiate_nodes;

begin

   Put( " Hello World! ");

end test1;



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

end of thread, other threads:[~2011-03-17 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-17 13:33 Error in gnat-4.6 (opensuse 11.4) ? reinkor
2011-03-17 14:34 ` Simon Wright
2011-03-17 16:50   ` Jeffrey Carter

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