I've got my Redhat RPM working and ACATS looks good but the following code fails horribly.
with Text_IO; with Interfaces; use Interfaces; procedure Slice_Bug is
subtype Slice_Type is String(1..4);
function identity(A : in Character) return Character is begin return a; end identity;
function Get_Slice return Slice_Type is begin return identity('a') & identity('b') & identity('c') & identity('d'); end Get_Slice;
begin Text_IO.Put_Line(Get_Slice); end Slice_Bug;
I expect it to print abcd Instead it prints 4 garbage characters.
I suspect a 4.0.2 bug and submitted a GCC bug report but there is always a chance there is just something wrong with the RPM I built.
Can this be confirmed on another platform (mine is 32bit redhat 4)
It has been confirmed (now) on bugzilla.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25573
Log in to post a comment.
I've got my Redhat RPM working and ACATS looks good but the following code fails horribly.
with Text_IO;
with Interfaces; use Interfaces;
procedure Slice_Bug is
subtype Slice_Type is String(1..4);
function identity(A : in Character) return Character is
begin
return a;
end identity;
function Get_Slice return Slice_Type is
begin
return identity('a') & identity('b') & identity('c') & identity('d');
end Get_Slice;
begin
Text_IO.Put_Line(Get_Slice);
end Slice_Bug;
I expect it to print abcd
Instead it prints 4 garbage characters.
I suspect a 4.0.2 bug and submitted a GCC bug report but there is always a chance there is just something wrong with the RPM I built.
Can this be confirmed on another platform (mine is 32bit redhat 4)
It has been confirmed (now) on bugzilla.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25573