[Bug ada/69926] GNAT bug detected -- Storage_Error stack overflow or erroneous memory access
keith at aquilonis dot net
gcc-bugzilla@gcc.gnu.org
Tue Feb 23 19:10:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69926
--- Comment #2 from Keith Godfrey <keith at aquilonis dot net> ---
Source code attached. Here is code as a comment:
---- muscles.ads
package Muscles is
type stretch is digits 5 range 0.0 .. 1.0;
type spindle_t is
record
center: stretch := 0.0;
end record;
type spindle_array is array(1 .. 40) of spindle_t;
procedure foo(spindles: in out spindle_array);
end Muscles;
---- muscles.adb
package body Muscles is
--
procedure foo(spindles: in out spindle_array) is
pos: stretch;
begin
for i in spindles'range loop
pos := stretch(float(i - 1) / float(spindles'range - 1)):
spindles(i).center := pos;
end loop;
end foo;
end Muscles;
More information about the Gcc-bugs
mailing list