Bug 38393 - Storage_Error, bug box on record with large array component
Summary: Storage_Error, bug box on record with large array component
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-04 07:45 UTC by Michael Völske
Modified: 2008-12-05 09:15 UTC (History)
2 users (show)

See Also:
Host:
Target: 4.4.0
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Völske 2008-12-04 07:45:13 UTC
procedure Main is
    type Arr is array (Natural) of Natural;

    type Rec is record
            A : Arr := (others => 0); 
        end record;
begin
    null;
end;

------------

gcc-4.3 -c main.adb
+===========================GNAT BUG DETECTED==============================+
| 4.3.2 (i486-pc-linux-gnu) Storage_Error heap exhausted                   |
| Error detected at main.adb:4:5                                           |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc-4.3 or gnatmake command that you entered.          |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

list may be incomplete
compilation abandoned
End of compilation
gnatmake: "main.adb" compilation error
Comment 1 Samuel Tardieu 2008-12-05 09:02:03 UTC
This bug has been fixed already in GCC 4.4.0.
Comment 2 Steven Bosscher 2008-12-05 09:15:14 UTC
Is it possible to back-port the fix to GCC 4.3?
Comment 3 Samuel Tardieu 2008-12-05 09:19:28 UTC
Subject: Re:  Storage_Error, bug box on record with large
	array component

* steven at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> [2008-12-05 09:15:14 -0000]

| Is it possible to back-port the fix to GCC 4.3?

It may be possible if you identify the commit that fixed it :/ I only
did a test run and noticed that I could reproduce it with GCC 4.3.2 on
i686-pc-linux-gnu and not with GCC 4.4.0 on the same target, but hadn't
noticed the bug before.

Finding the right commit may be hard, as the problem may have been
fixed by the side-effect of a totally unrelated commit, so good luck
with that.