DWARF: fix scoping for descriptions of local types
In Ada, it is possible to have nested subprograms in the following
configuration:
procedure Parent is
type T;
[...]
procedure Child (Value : T) is
begin
[...]
end Child;
begin
[...]
end Parent;
As we currently generate debugging information for Child first before
Parent, the debug info for T appears in global scope since the DIE for
Parent does not exist yet.
This patch makes sure that when we generate early debug info for a
nested function, we trigger generation for the parent function first.
gcc/
* dwarf2out.c (dwarf2out_early_global_decl): For nested
functions, call dwarf2out_decl on the parent function first.
gcc/testsuite/
* gnat.dg/debug9.adb: New testcase.
From-SVN: r241023