comp.lang.ada
 help / color / mirror / Atom feed
From: reinkor <reinkor@gmail.com>
Subject: Error in gnat-4.6  (opensuse 11.4) ?
Date: Thu, 17 Mar 2011 06:33:11 -0700 (PDT)
Date: 2011-03-17T06:33:11-07:00	[thread overview]
Message-ID: <18becfb4-48a3-4e36-a078-48cfa444108b@x1g2000yqb.googlegroups.com> (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;



             reply	other threads:[~2011-03-17 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 13:33 reinkor [this message]
2011-03-17 14:34 ` Error in gnat-4.6 (opensuse 11.4) ? Simon Wright
2011-03-17 16:50   ` Jeffrey Carter
replies disabled

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