procedure Test_247564 is package pak2 is type t2(b2: boolean) is private; private type t2(b2: boolean) is null record; end pak2; package pak1 is type T1(b1 : boolean) is private; private type T1(b1 : boolean) is new pak2.t2(b1); end pak1; x: pak1.t1(false); b: boolean; begin b := x.b1; end Test_247564; $ gcc-3.4 -q -O1 test_247564 +===========================GNAT BUG DETECTED==============================+ | 3.4.0 (Debian) (i486-pc-linux-gnu) Gigi abort, Code=103 | | Error detected at test_247564.adb:18:9 | | 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-3.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. test_247564.adb compilation abandoned gnatmake: "test_247564.adb" compilation error
Confirmed on the mainline: +===========================GNAT BUG DETECTED==============================+ | 4.0.0 20041008 (experimental) (powerpc-apple-darwin7.4.1) GCC error: | | in gnat_to_gnu_entity, at /ada/decl.c:466 | | Error detected at test_247564.adb:18:9 | | 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). | +============================================================== ============+
Still present on SVN trunk +===========================GNAT BUG DETECTED==============================+ | 4.3.0 20071127 (experimental) (i686-pc-linux-gnu) GCC error: | | in gnat_to_gnu_entity, at ada/decl.c:491 | | Error detected at test_247564.adb:18:9 |
+===========================GNAT BUG DETECTED==============================+ | 4.3.0 20071213 (experimental) (i686-pc-linux-gnu) GCC error: | | in gnat_to_gnu_entity, at ada/decl.c:491 | | Error detected at test_247564.adb:18:9 |
+===========================GNAT BUG DETECTED==============================+ | 4.5.0 20091003 (experimental) (i686-pc-linux-gnu) GCC error: | | in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:544 | | Error detected at test_247564.adb:18:9 |
+===========================GNAT BUG DETECTED==============================+ | 4.6.1 (x86_64-pc-linux-gnu) GCC error: | | in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:599 | | Error detected at test_70.adb:18:9 |
4.9.0 20140218 (experimental) [trunk rev 207856] (x86_64-linux-gnu) GCC error in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:568 Error detected at test_70.adb:18:9
Fixed in GCC 5.