This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 1/10] debug-early merge: Ada front-end
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, jason merrill <jason at redhat dot com>
- Date: Fri, 22 May 2015 10:31:45 +0200
- Subject: Re: [patch 1/10] debug-early merge: Ada front-end
- Authentication-results: sourceware.org; auth=none
- References: <554C0417 dot 8020300 at redhat dot com> <6819186 dot gzK1HFtdtl at polaris> <555E4C87 dot 9040804 at redhat dot com>
> My apologies for the delay on Ada. I have reworked the patch to leave
> the first pass on the TYPE_DECLs which are definitely needed. I also
> optimized things a bit, since we don't need to save all the globals any
> more.
Thanks, this looks fine modulo a couple of nits, see below.
> There is one regression which I'd like you and Jason's input before
> proceeding:
>
> +FAIL: gnat.dg/specs/debug1.ads scan-assembler-times DW_AT_artificial 17
>
> The problem is that the Ada front-end twiddles the DECL_ARTIFICIAL flag
> *after* it has called debug_hooks->early_global_decl(). The function
> gnat_to_gnu_entity() calls create_var_decl_1->rest_of_decl_compilation,
> but then much later twiddles DECL_ARTIFICIAL:
>
> if (!Comes_From_Source (gnat_entity))
> DECL_ARTIFICIAL (gnu_decl) = 1;
>
> Twiddling DECL_ARTIFICIAL after we create early dwarf, means the DIE
> does not get the DW_AT_artificial. Would it be possible for you guys
> (ahem, Ada folk) to set DECL_ARTIFICIAL before calling
> rest_of_decl_compilation?
Sure, just add a ??? comment before the above lines for now.
@@ -535,8 +535,7 @@ extern tree gnat_type_for_size (unsigned precision, int
unsignedp);
an unsigned type; otherwise a signed type is returned. */
extern tree gnat_type_for_mode (machine_mode mode, int unsignedp);
-/* Emit debug info for all global variable declarations. */
-extern void gnat_write_global_declarations (void);
+extern void note_types_used_by_globals (void);
The comment needs to be adjusted instead of removed and preferably be the same
as the one (ajusted too) above the function in utils.c.
--
Eric Botcazou