This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 10/10] debug-early merge: compiler proper
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>, Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 May 2015 16:40:12 -0400
- Subject: Re: [patch 10/10] debug-early merge: compiler proper
- Authentication-results: sourceware.org; auth=none
- References: <554C060F dot 6000609 at redhat dot com> <CAFiYyc16u2na9VeyMb5cVf4cH=caiBy6PRTJkX9DndzHcFxkBQ at mail dot gmail dot com> <555CAD35 dot 5040304 at redhat dot com>
How does this version, which has been committed to the debug-early
branch, look?
One more thing Richi. I merged trunk into the branch once again, and Go
broke. I tracked it down to a temporary that was being created late
that IMO shouldn't even get debug info.
The fact that it gets created with create_tmp_var_name() in the first
place is suspect. The problem is actually the type, which doesn't even
get passed through rest_of_type* or the debug_hooks->type_decl().
However, I see no reason to have these temporary variables even get fed
to the debugger, so I'm marking them as DECL_IGNORED_P.
If you want I can repost the whole compiler proper patch, but this is a
small enough change that y'all can just wave through.
I've committed the snippet below to the branch. Everything else is as
it was.
Branch retested on x86-64 Linux and has been merged with trunk.
commit 8824b5ecba26cef065e47b34609c72677c3c36fc
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Wed May 20 16:31:14 2015 -0400
Set DECL_IGNORED_P on temporary arrays created in the switch
conversion pass.
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 6b68a16..a4bcdba 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -1097,6 +1097,7 @@ build_one_array (gswitch *swtch, int num, tree
arr_index_type,
DECL_ARTIFICIAL (decl) = 1;
TREE_CONSTANT (decl) = 1;
TREE_READONLY (decl) = 1;
+ DECL_IGNORED_P (decl) = 1;
varpool_node::finalize_decl (decl);
fetch = build4 (ARRAY_REF, value_type, decl, tidx, NULL_TREE,