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]

Fix crash with -dU


The compiler segfaults on always_inline functions when -dU is passed.  This 
appeared with the Tree-SSA merge because the node enumeration switched from 
enumeration of callers to that of callees and the dump lines were not 
adjusted.

Applied as obvious.


2004-06-06  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* cgraphunit.c (cgraph_decide_inlining): Adjust dump lines in
	always_inline pass.


-- 
Eric Botcazou
Index: cgraphunit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v
retrieving revision 1.64
diff -u -p -r1.64 cgraphunit.c
--- cgraphunit.c	30 May 2004 18:32:24 -0000	1.64
+++ cgraphunit.c	6 Jun 2004 12:36:52 -0000
@@ -1482,7 +1482,7 @@ cgraph_decide_inlining (void)
       if (cgraph_dump_file)
 	fprintf (cgraph_dump_file,
 		 "\nConsidering %s %i insns (always inline)\n",
-		 cgraph_node_name (e->callee), e->callee->global.insns);
+		 cgraph_node_name (node), node->global.insns);
       old_insns = overall_insns;
       for (e = node->callers; e; e = next)
 	{
@@ -1496,8 +1496,8 @@ cgraph_decide_inlining (void)
 	  if (cgraph_dump_file)
 	    fprintf (cgraph_dump_file, 
 		     " Inlined into %s which now has %i insns.\n",
-		     cgraph_node_name (node->callees->caller),
-	             node->callees->caller->global.insns);
+		     cgraph_node_name (e->caller),
+		     e->caller->global.insns);
 	}
       if (cgraph_dump_file)
 	fprintf (cgraph_dump_file, 

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