diff mbox

PR middle-end/57467

Message ID 20130601164345.GA6670@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka June 1, 2013, 4:43 p.m. UTC
Hi,
local passes are allowed to create new functions. The main iterator should however only
deal with those that was already there before.  This broke with my part 1 symtab cleanup
patch, since I changed FOR_EACH_DEFINED_FUNCTION to test node->definition instead of
node->analyzed. Hopefully there won't be much more places needing fix.

Bootstrapped/regtested ppx64-linux with TLS disabled, commited.
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 199581)
+++ ChangeLog	(working copy)
@@ -1,5 +1,10 @@ 
 2013-06-01  Jan Hubicka  <jh@suse.cz>
 
+	PR middle-end/57467
+	* passes.c (for_per_function): Skip unanalyzed functoins.
+
+2013-06-01  Jan Hubicka  <jh@suse.cz>
+
 	* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ...
 	(lto_symtab_merge_symbols_1): ... this one.
 	(lto_symtab_merge_cgraph_nodes): Rename to ...
Index: passes.c
===================================================================
--- passes.c	(revision 199581)
+++ passes.c	(working copy)
@@ -1709,7 +1709,7 @@ 
     {
       struct cgraph_node *node;
       FOR_EACH_DEFINED_FUNCTION (node)
-	if (gimple_has_body_p (node->symbol.decl)
+	if (node->symbol.analyzed && gimple_has_body_p (node->symbol.decl)
 	    && (!node->clone_of || node->symbol.decl != node->clone_of->symbol.decl))
 	  {
 	    push_cfun (DECL_STRUCT_FUNCTION (node->symbol.decl));