This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/42462] [4.5 Regression] wrong-code with computed-goto
- From: "jamborm at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jan 2010 13:39:11 -0000
- Subject: [Bug tree-optimization/42462] [4.5 Regression] wrong-code with computed-goto
- References: <bug-42462-8535@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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