This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tuples] declare_vars changes


> > 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);
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]