> My question exactly. Perhaps that was my confusion. Why is this using > ->global_decl? Because that's equivalent to ->type_decl (iter, false) in DWARF. > For example, the C front-end uses rest_of_type_compilation (see > finish_struct() in c/c-decl.c) which calls ->type_decl(), or it calls > ->type_decl() from record_builtin_type(). All right, let's follow the gospel then. :-) Patch attached and installed. > I can put the code back, but calling ->type_decl()? Assuming you folks > (Ada) don't want to use rest_of_type_compilation(). No, we don't use it for local types either (it's a no-op in DWARF in this case and we don't support STABS anymore because of the need to manually delay the generation of debug info for local types, which is a real pain in Ada). * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl method instead of global_decl for TYPE_DECLs. -- Eric Botcazou