public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/56474] New: GNAT computes size of the object to be allocated incorrectly
@ 2013-02-27 17:41 pavel at zhukoff dot net
  2013-02-28 11:02 ` [Bug ada/56474] [4.8 regression] bogus Storage_Error raised for record containing empty zero-based array ebotcazou at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: pavel at zhukoff dot net @ 2013-02-27 17:41 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56474

             Bug #: 56474
           Summary: GNAT computes size of the object to be allocated
                    incorrectly
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pavel@zhukoff.net


100% reproducible

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


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

end of thread, other threads:[~2013-05-07  8:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27 17:41 [Bug ada/56474] New: GNAT computes size of the object to be allocated incorrectly pavel at zhukoff dot net
2013-02-28 11:02 ` [Bug ada/56474] [4.8 regression] bogus Storage_Error raised for record containing empty zero-based array ebotcazou at gcc dot gnu.org
2013-02-28 11:04 ` ebotcazou at gcc dot gnu.org
2013-03-01 11:28 ` rguenth at gcc dot gnu.org
2013-03-01 14:26 ` ebotcazou at gcc dot gnu.org
2013-03-01 14:33 ` [Bug middle-end/56474] " ebotcazou at gcc dot gnu.org
2013-03-04  9:53 ` rguenth at gcc dot gnu.org
2013-03-04 11:29 ` ebotcazou at gcc dot gnu.org
2013-03-04 15:12 ` rguenther at suse dot de
2013-03-04 15:39 ` ebotcazou at gcc dot gnu.org
2013-03-04 15:45 ` rguenther at suse dot de
2013-03-04 15:51 ` jakub at gcc dot gnu.org
2013-03-04 16:19 ` ebotcazou at gcc dot gnu.org
2013-03-05  9:05 ` rguenther at suse dot de
2013-03-06 17:21 ` ebotcazou at gcc dot gnu.org
2013-03-07 11:37 ` jakub at gcc dot gnu.org
2013-03-22 14:42 ` [Bug middle-end/56474] [4.8/4.9 " jakub at gcc dot gnu.org
2013-05-06  9:34 ` ebotcazou at gcc dot gnu.org
2013-05-07  7:50 ` [Bug ada/56474] " ebotcazou at gcc dot gnu.org
2013-05-07  8:07 ` ebotcazou at gcc dot gnu.org
2013-05-07  8:07 ` ebotcazou at gcc dot gnu.org
2013-05-07  8:08 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).