This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] declare_vars changes
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: amacleod at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 Jul 2007 18:05:31 -0400
- Subject: Re: [tuples] declare_vars changes
- References: <20070718160525.GA13425@redhat.com> <469E8D06.2040001@google.com>
> > Second, there is a call to declare_vars from within gimple_add_tmp_var
> > which looked dubious to me (see FIXME). It was calling declare_vars
> > when we didn't have a gimplify context and we didn't have cfun set. I
> > couldn't think of any case where that might be true, and I did a full
> > bootstrap of (C/C++) and didn't trigger it once. Is this used in any of
> > the other languages, or in some weird context I haven't thought of?
> > Just curious...
>
> That's for nested functions. We need to expose the locals they create.
In that case, I'm removing the abort, and adding a friendly comment,
because for the life of me, nested functions were not at all obvious.
Thanks.
* gimplify.c (gimple_add_tmp_var): Remove abort. Add comment.
Index: gimplify.c
===================================================================
--- gimplify.c (revision 126729)
+++ gimplify.c (working copy)
@@ -736,10 +736,8 @@ gimple_add_tmp_var (tree tmp)
{
gimple_seq body_seq;
- /* FIXME tuples: In a full bootstrap, I've never triggered
- this. Is this call to declare_vars() really needed? */
- gcc_unreachable ();
-
+ /* This case is for nested functions. We need to expose the locals
+ they create. */
body_seq = gimple_body (current_function_decl);
declare_vars (tmp, gimple_seq_first (body_seq), false);
}