public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/42462] [4.5 Regression] wrong-code with computed-goto
Date: Tue, 05 Jan 2010 13:39:00 -0000	[thread overview]
Message-ID: <20100105133911.31512.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42462-8535@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2010-01-05 13:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 13:31 [Bug tree-optimization/42462] New: " wouter dot vermaelen at scarlet dot be
2009-12-22 14:16 ` [Bug tree-optimization/42462] " paolo dot carlini at oracle dot com
2009-12-23 17:21 ` wouter dot vermaelen at scarlet dot be
2009-12-31 15:57 ` [Bug tree-optimization/42462] [4.5 Regression] " rguenth at gcc dot gnu dot org
2010-01-02 16:08 ` rguenth at gcc dot gnu dot org
2010-01-05 13:39 ` jamborm at gcc dot gnu dot org [this message]
2010-01-05 16:03 ` jamborm at gcc dot gnu dot org
2010-01-05 19:43 ` jamborm at gcc dot gnu dot org
2010-01-05 19:44 ` jamborm at gcc dot gnu dot org
2010-01-07 22:24 ` hjl at gcc dot gnu dot org
2010-02-08 14:11 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100105133911.31512.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).