procedure Main is type Bar(E : Integer) is null record; type CurrentType(D : Integer) is record Field : Bar(CurrentType'Size); -- not sure if this is valid but the compiler shouldn't crash end record; begin null; end Main;
command line is gcc -c main.adb gcc 4.0.0 says +===========================GNAT BUG DETECTED==============================+ | 4.0.0 (i686-pc-linux-gnu) in Attribute_to_gnu, at ada/trans.c:741 | | Error detected at main.adb:5:22 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | 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). | +==========================================================================+ Both gcc 2.8.1 and gcc 4.0.0 aborts. The second line of the 2.8.1 box says | 3.15p (20020523) (i686-pc-linux-gnu) Gigi abort, Code=401 | gcc 4.0.0 was built from 4.0.0 source (last change log entry 2005-04-20) with default settings and c,c++,objc,ada enabled. -- Summary: gcc aborts compiling record whose component definition refers to 'Size of current type Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: stephaniechc-gccbug at yahoo dot com GCC host triplet: Linux 2.4.21-4-686-smp #1 SMP i686 GNU/Linux GCC target triplet: Linux 2.4.21-4-686-smp #1 SMP i686 GNU/Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24992