------- Comment #5 from ben dot midgley at ultra-datel dot com 2006-02-20 14:21 ------- I believe this is the same problem, if not it is a very similar and likely related problem. I have nested the data types from the first code into an array and have a similar message.
$ gcc -v Using built-in specs. Target: i686-pc-cygwin Configured with: ../gcc-4.1-20060210/configure --disable-win32-registry --enable-languages=ada Thread model: single gcc version 4.1.0 20060210 (prerelease) $ gcc -c scratch.adb +===========================GNAT BUG DETECTED==============================+ | 4.1.0 20060210 (prerelease) (i686-pc-cygwin) GCC error: | | in expand_expr_addr_expr_1, at expr.c:6376 | | Error detected at scratch.adb:15:9 | | 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. scratch.adb scratch.ads compilation abandoned ------------------------------------------------------------------------------------- -- Begin scratch.ads package Scratch is subtype Trigram_Type is String (1 .. 3); type MyInteger is new Integer range 1..99; type MyRecordType is record Trigram : Trigram_Type; end record; for MyRecordType use record Trigram at 0 range 20 .. 43; end record; for MyRecordType'Size use 44; type MyTableType is array (MyInteger) of MyRecordType; pragma Pack (MyTableType); type MyDataType is record StudTable : MyTableType; end record; procedure Set ( Trigram : in Trigram_Type; NestedData : in out MyDataType ); end Scratch; -- end scratch.ads ------------------------------------------------------------------------------------- -- begin scratch.adb package body Scratch is procedure Set ( Trigram : in Trigram_Type ; NestedData : in out MyDataType ) is Index : MyInteger := 1; begin if NestedData.StudTable(Index).Trigram = Trigram then Index:=2; end if; end Set; end Scratch; -- end scratch.adb -- ben dot midgley at ultra-datel dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|FIXED | Version|4.2.0 |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26317