This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Test on object too large on a 32-bit machine were not generating an exception. This patch adds a special front end test that at least catches some common cases for array types. The following program: procedure obj_too_large is function id (x : integer) return integer is begin return x; end; type m is array (integer'first .. id (integer'last)) of integer; type p is access m; pv : p; begin pv := new m; end; executed on a 32-bit machine previously executed silently (allocating some junk too small array), with the patch it generates: raised STORAGE_ERROR : obj_too_large.adb:9 object too large Tested on x86_64-pc-linux-gnu, committed on trunk 2009-04-15 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_N_Allocator): Install test for object too large
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |