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
This bug has been fixed already in GCC 4.4.0.
Is it possible to back-port the fix to GCC 4.3?
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.