http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084
--- Comment #14 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-12-04 21:59:13 UTC --- > (gdb) call pn(gnat_root) > N_Compilation_Unit (Node_Id=1707) (source,analyzed) > Parent = <empty> > Sloc = 9966 a-charac.ads:16:12 > Context_Items = List (List_Id=-99999988) > Unit = N_Package_Declaration (Node_Id=1722) > Aux_Decls_Node = N_Compilation_Unit_Aux (Node_Id=1708) > > It seems OK to me on the Ada side. I wonder what makes it trigger the > assertion > gcc_assert (Nkind (gnat_root) == N_Compilation_Unit) > > Maybe the C accessor "Nkind" is not working well for some reason? Yes, there is something really weird going on at the interface between C and Ada. Unfortunately I don't seem to be able to reproduce on Linux. Could you see what object code has been generated for the line gcc_assert (Nkind (gnat_root) == N_Compilation_Unit); in stage1-gcc/ada/trans.o and prev-gcc/ada/trans.o?