Bug 914630

Summary: GNAT computes size of the object to be allocated incorrectly
Product: [Fedora] Fedora Reporter: Pavel Zhukov <pzhukov>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: jakub, law, nobody, pzhukov, reznikmm, vgodunko
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-14 17:21:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 913852    

Description Pavel Zhukov 2013-02-22 10:54:32 UTC
Description of problem:
GNAT computes size of the object to be allocated incorrectly

Version-Release number of selected component (if applicable):
gcc-4.8 from the rawhide tree

How reproducible:
100%

Steps to Reproduce:
1.rebuild matreshka package
  
Actual results:
failed to build please see bug 913852 and rawhide report.

Additional info:

Comment 1 Pavel Zhukov 2013-02-22 23:40:38 UTC
Smaller reproducer:

with Ada.Streams;

package Pkg is
   use type Ada.Streams.Stream_Element_Offset;

   type Vector (Size : Ada.Streams.Stream_Element_Offset) is record
      Value : Ada.Streams.Stream_Element_Array (0 .. Size);
   end record;

   Empty_Vector : Vector (-1);
   
end Pkg;

with Pkg;
procedure Bbb is
begin
   null;
end Bbb;

$ gnatmake bbb
gcc -c bbb.adb
gcc -c pkg.ads
pkg.ads:10:04: warning: "Storage_Error" will be raised at run time
gnatbind -x bbb.ali
gnatlink bbb.ali

$ ./bbb

raised STORAGE_ERROR : object too large

Comment 2 Fedora End Of Life 2013-04-03 15:07:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19