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: [C++ PATCH] Fix PR 13701 g++.old-deja/g++.eh/cleanup2.C ICEs



On Jan 20, 2004, at 09:06, Jason Merrill wrote:
Ah, I see, the problem is that we haven't run finish_eh_spec_block yet when
we call finish_fname_decls. Could you try reordering the code in
finish_function? It looks like just moving the finish_fname_decls call
down would work.


In fact the moving down the finish_fname_decls worked, thanks for the suggestion.

Here is the patch which moves down finish_fname_decls, now it only patches the C++.

OK? Bootstrapped on powerpc-apple-darwin7.2.0 with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

	* decl.c (finish_function): Move the call to
	finish_fname_decls below the call to
	finish_eh_spec_block.

Patch:


Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1175
diff -u -p -r1.1175 decl.c
--- decl.c 17 Jan 2004 18:59:44 -0000 1.1175
+++ decl.c 21 Jan 2004 07:50:40 -0000
@@ -10736,8 +10736,6 @@ finish_function (int flags)
which then got a warning when stored in a ptr-to-function variable. */


   my_friendly_assert (building_stmt_tree (), 20000911);
-
-  finish_fname_decls ();

   /* For a cloned function, we've already got all the code we need;
      there's no need to add any extra bits.  */
@@ -10761,6 +10759,8 @@ finish_function (int flags)
 			      (TREE_TYPE (current_function_decl)),
 			      current_eh_spec_block);
     }
+
+  finish_fname_decls ();

   /* If we're saving up tree structure, tie off the function now.  */
   finish_stmt_tree (&DECL_SAVED_TREE (fndecl));


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