-- This package crashes ada frontend in internal_error call: package B is type T0 is record i : Integer; end record; type T1 is access all T0; type T2 is array (Natural range <>) of T1; type T3 (N : Natural) is record t : T2 (1 .. N); end record; end B; --
$ gdb gnat1 Using host libthread_db library "/lib/libthread_db.so.1". Breakpoint 1 at 0x851ac4: file ../../gcc41/gcc/diagnostic.c, line 590. Breakpoint 2 at 0x8518dd: file ../../gcc41/gcc/diagnostic.c, line 534. Function "exit" not defined. Function "abort" not defined. (gdb) run -O1 -quiet ./b.ads -I/home/ssb/src/gcc41/gcc/ada Starting program: /home/ssb/src/build1/gcc/gnat1 -O1 -quiet ./b.ads -I/home/ssb/src/gcc41/gcc/ada Breakpoint 2, internal_error ( gmsgid=0xf01368 "tree check: expected tree that contains %qs structure, have %qs in %s, at %s:%d") at ../../gcc41/gcc/diagnostic.c:534 534 va_start (ap, gmsgid); (gdb) bt #0 internal_error ( gmsgid=0xf01368 "tree check: expected tree that contains %qs structure, have %qs in %s, at %s:%d") at ../../gcc41/gcc/diagnostic.c:534 #1 0x0000000000b9a251 in tree_contains_struct_check_failed ( node=0x2aaaab124750, en=TS_DECL_WRTL, file=0xe68d60 "../../gcc41/gcc/emit-rtl.c", line=957, function=0x112f9cc "set_decl_rtl") at ../../gcc41/gcc/tree.c:5928 #2 0x000000000087e913 in set_decl_rtl (t=0x2aaaab124750, x=0x0) at ../../gcc41/gcc/emit-rtl.c:957 #3 0x0000000000c39d5e in copy_decl_for_dup (decl=0x2aaaab124680, from_fn=0x2aaaab122100, to_fn=0x2aaaab122100, versioning=0 '\0') at ../../gcc41/gcc/tree-inline.c:2693 #4 0x0000000000c2f580 in remap_decl (decl=0x2aaaab124680, id=0x7fffff8a5040) at ../../gcc41/gcc/tree-inline.c:204 #5 0x0000000000c386e9 in save_body (fn=0x2aaaab122100, arg_copy=0x2aaaab11d440, sc_copy=0x2aaaab11d448) at ../../gcc41/gcc/tree-inline.c:2360 #6 0x0000000000747dea in tree_rest_of_compilation (fndecl=0x2aaaab122100) at ../../gcc41/gcc/tree-optimize.c:381 #7 0x000000000043522f in gnat_expand_body (gnu_decl=0x2aaaab122100) at ../../gcc41/gcc/ada/misc.c:636 #8 0x0000000000c409a2 in cgraph_expand_function (node=0x2aaaab126840) at ../../gcc41/gcc/cgraphunit.c:1034 #9 0x0000000000c40c30 in cgraph_expand_all_functions () at ../../gcc41/gcc/cgraphunit.c:1100 #10 0x0000000000c4132a in cgraph_optimize () at ../../gcc41/gcc/cgraphunit.c:1257 #11 0x000000000043304a in gnat_parse_file (set_yydebug=0) at ../../gcc41/gcc/ada/misc.c:245 #12 0x0000000000b6db9c in compile_file () at ../../gcc41/gcc/toplev.c:971 #13 0x0000000000b6f6c4 in do_compile () at ../../gcc41/gcc/toplev.c:1914 ---Type <return> to continue, or q <return> to quit---q Quit (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x00002aaaaad14487 in vfprintf () from /lib/libc.so.6 (gdb) -- Summary: ICE in tree_contains_struct_check_failed Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, ice-checking Severity: normal Priority: P2 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: belyshev at depni dot sinp dot msu dot ru CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23174