This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/50502] New: GNAT fails to compile a modification of B37101A ACATS test
- From: "tero.koskinen at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 24 Sep 2011 04:11:47 +0000
- Subject: [Bug ada/50502] New: GNAT fails to compile a modification of B37101A ACATS test
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50502
Bug #: 50502
Summary: GNAT fails to compile a modification of B37101A ACATS
test
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tero.koskinen@iki.fi
GNAT shows its bug box when one tries to compile following procedure:
-- b37101a.adb
PROCEDURE B37101A IS
TYPE ACC_STRING IS ACCESS string;
FUNCTION F (S : acc_string) RETURN INTEGER IS
BEGIN
RETURN 1;
END F;
TYPE S IS RECORD
C2 : INTEGER RANGE 1 .. F (NEW STRING (1 .. 3) );
END RECORD;
BEGIN
null;
END B37101A;
The above procedure is a modified version of B37101A ACATS test.
The error below:
$ gnatmake b37101a.adb
gcc -c b37101a.adb
+===========================GNAT BUG DETECTED==============================+
| 4.6.0 20110603 (Red Hat 4.6.0-10) (i686-redhat-linux-gnu) Assert_Failure
atree.adb:794|
| Error detected at b37101a.adb:11:37 |
| 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 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.
Consider also -gnatd.n switch (see debug.adb).
b37101a.adb
compilation abandoned
gnatmake: "b37101a.adb" compilation error
$
Extra info:
This is what happens with GNAT GPL 2011 (on Fedora Linux 15/i386):
$ gnatmake b37101a.adb
gcc -c b37101a.adb
b37101a.adb:11:37: subtype mark required in this context
b37101a.adb:11:37: found "S3B" declared at line 11
gnatmake: "b37101a.adb" compilation error
$
Janus/Ada can compile the code without errors (as expected).