public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/50263] New: Constant integer in multidimensional array 'Range(X) crashes GNAT
@ 2011-09-01 12:36 gnubugs at lyse dot isobeef.org
0 siblings, 0 replies; only message in thread
From: gnubugs at lyse dot isobeef.org @ 2011-09-01 12:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50263
Bug #: 50263
Summary: Constant integer in multidimensional array 'Range(X)
crashes GNAT
Classification: Unclassified
Product: gcc
Version: 4.4.6
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gnubugs@lyse.isobeef.org
Created attachment 25160
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25160
Sample Ada source code to show the crash
When using a constant integer in a 'Range(X) value of an multidimensional
array, gnatmake crashes with a bug box. However, using a constant works. Having
the following definitions
type Matrix_Type is array (1..3, 1..3) of Integer;
First_Range : constant Integer := 1;
Matrix : Matrix_Type := (others => (others => 0));
GNAT will crash when compiling
Matrix'Range(First_Range)
When First_Range is replaced by
First_Range : constant := 1;
everything is fine. See attached source code to reproduce this. I'm using
GNATMAKE 4.4.6 from Debian Testing.
$ gnatmake constant_integer_as_array_range_value_crashes_gnat.adb
gcc-4.4 -c constant_integer_as_array_range_value_crashes_gnat.adb
+===========================GNAT BUG DETECTED==============================+
| 4.4.6 (i486-pc-linux-gnu) Assert_Failure sinfo.adb:1563 |
| Error detected at
constant_integer_as_array_range_value_crashes_gnat.adb:15:19|
| 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.4 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.
constant_integer_as_array_range_value_crashes_gnat.adb
compilation abandoned
gnatmake: "constant_integer_as_array_range_value_crashes_gnat.adb" compilation
error
Exit code 4.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-01 12:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-01 12:36 [Bug ada/50263] New: Constant integer in multidimensional array 'Range(X) crashes GNAT gnubugs at lyse dot isobeef.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).