public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
Date: Wed, 19 Jul 2006 13:32:00 -0000	[thread overview]
Message-ID: <20060719133157.19285.qmail@sourceware.org> (raw)
In-Reply-To: <bug-27882-12387@http.gcc.gnu.org/bugzilla/>



------- Comment #23 from rguenth at gcc dot gnu dot org  2006-07-19 13:31 -------
I have a patch:

Index: ipa-inline.c
===================================================================
--- ipa-inline.c        (revision 115554)
+++ ipa-inline.c        (working copy)
@@ -1133,6 +1133,7 @@ cgraph_early_inlining (void)
   struct cgraph_node **order =
     xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
   int i;
+  htab_t cycles;

   if (sorrycount || errorcount)
     return;
@@ -1142,6 +1143,8 @@ cgraph_early_inlining (void)
 #endif

   nnodes = cgraph_postorder (order);
+  cycles = htab_create (7, htab_hash_pointer, htab_eq_pointer, NULL);
+  cgraph_find_cycles (cgraph_nodes, cycles);
   for (i = nnodes - 1; i >= 0; i--)
     {
       node = order[i];
@@ -1149,10 +1152,13 @@ cgraph_early_inlining (void)
          && (node->needed || node->reachable)
          && node->callers)
        {
-         if (cgraph_decide_inlining_incrementally (node, true))
+         if (cgraph_decide_inlining_incrementally (node, true)
+             /* Avoid collecting if inlining in a cycle.  */
+             && !htab_find (cycles, node))
            ggc_collect ();
        }
     }
+  htab_delete (cycles);
   cgraph_remove_unreachable_nodes (true, dump_file);
 #ifdef ENABLE_CHECKING
   for (node = cgraph_nodes; node; node = node->next)


-- 


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


  parent reply	other threads:[~2006-07-19 13:32 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 " tbm at cyrius dot com
2006-06-03 10:18 ` [Bug tree-optimization/27882] " tbm at cyrius dot com
2006-06-03 10:19 ` tbm at cyrius dot com
2006-06-03 16:11 ` pinskia at gcc dot gnu dot org
2006-06-03 20:37 ` rguenth at gcc dot gnu dot org
2006-06-03 20:47 ` tbm at cyrius dot com
2006-06-03 20:52 ` rguenther at suse dot de
2006-06-03 21:20 ` tbm at cyrius dot com
2006-06-04 19:50 ` mmitchel at gcc dot gnu dot org
2006-06-05 19:59 ` janis at gcc dot gnu dot org
2006-06-06  6:13 ` pinskia at gcc dot gnu dot org
2006-06-07  5:31 ` pinskia at gcc dot gnu dot org
2006-06-07  5:50 ` pinskia at gcc dot gnu dot org
2006-06-07  6:01 ` pinskia at gcc dot gnu dot org
2006-06-07  6:19 ` pinskia at gcc dot gnu dot org
2006-06-07  7:02 ` pinskia at gcc dot gnu dot org
2006-06-07 12:25 ` hubicka at ucw dot cz
2006-06-07 15:04 ` rguenth at gcc dot gnu dot org
2006-06-07 16:16 ` tbm at cyrius dot com
2006-06-08 14:12 ` tbm at cyrius dot com
2006-06-11  8:39 ` steven at gcc dot gnu dot org
2006-06-12 18:05 ` tbm at cyrius dot com
2006-06-12 20:51 ` tbm at cyrius dot com
2006-07-19 12:44 ` [Bug tree-optimization/27882] [4.1/4.2 " reichelt at gcc dot gnu dot org
2006-07-19 13:19 ` rguenth at gcc dot gnu dot org
2006-07-19 13:32 ` rguenth at gcc dot gnu dot org [this message]
2006-07-19 13:59 ` rguenth at gcc dot gnu dot org
2006-07-19 14:07 ` rguenth at gcc dot gnu dot org
2006-07-19 17:29 ` hubicka at gcc dot gnu dot org
2006-07-20  8:29 ` rguenth at gcc dot gnu dot org
2006-07-26 20:17 ` hubicka at gcc dot gnu dot org
2007-02-14  9:12 ` [Bug tree-optimization/27882] [4.1 " mmitchel at gcc dot gnu dot org
2008-07-04 15:35 ` jsm28 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=20060719133157.19285.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).