------- Comment #4 from jamborm at gcc dot gnu dot org  2010-01-05 13:39 -------
This weird side-effect of IPA-SRA is caused by a bug in
compute_inline_parameters which should pass node->decl instead of
current_function_decl to its helper functions.  I am about to test the
following patch which fixes this problem:

Index: mine/gcc/ipa-inline.c
===================================================================
--- mine.orig/gcc/ipa-inline.c
+++ mine/gcc/ipa-inline.c
@@ -1859,10 +1859,10 @@ compute_inline_parameters (struct cgraph
   node->global.stack_frame_offset = 0;

   /* Can this function be inlined at all?  */
-  node->local.inlinable = tree_inlinable_function_p (current_function_decl);
+  node->local.inlinable = tree_inlinable_function_p (node->decl);
   if (node->local.inlinable && !node->local.disregard_inline_limits)
     node->local.disregard_inline_limits
-      = DECL_DISREGARD_INLINE_LIMITS (current_function_decl);
+      = DECL_DISREGARD_INLINE_LIMITS (node->decl);
   estimate_function_body_sizes (node);
   /* Inlining characteristics are maintained by the cgraph_mark_inline.  */
   node->global.time = inline_summary (node)->self_time;


-- 

jamborm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jamborm at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-12-31 15:57:11         |2010-01-05 13:39:11
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42462

Reply via email to