with unchecked_conversion; procedure Test_100 is package pak1 is type T2 is private; function "=" (left, right : T2) return Boolean; private type T3 is access integer; type T2 is new T3; function convert is new unchecked_conversion (integer, T3); end pak1; package body pak1 is function "=" (left, right : T2) return Boolean is begin return false; end "="; end pak1; generic type T1 is private; x1: in T1; x2: in out T1; package pak2 is b: boolean := x1 = x2; end pak2; y1: pak1.T2; y2: pak1.T2; package new_pak2 is new pak2 (pak1.T2, y1, y2); begin null; end Test_100; gcc -c -x ada test_100.ada +===========================GNAT BUG DETECTED==============================+ | 3.5.0 20040327 (experimental) (i686-pc-linux-gnu) Gigi abort, Code=505 | | Error detected at test_100.ada:30:26 [test_100.ada:35:4] | | 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). | +==========================================================================+
Confirmed on the mainline: +===========================GNAT BUG DETECTED==============================+ | 4.0.0 20041008 (experimental) (powerpc-apple-darwin7.4.1) GCC error: | | in build_binary_op, at /ada/utils2.c:875 | | Error detected at test_100.ada:30:26 [test_100.ada:35:4] | | 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). | +============================================================== ============+
Fixed in 4.2.0.