public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ilya Enkovich <enkovich.gnu@gmail.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH, PR ipa/66566] Fix ICE in early_inliner: internal compiler error: in operator[]
Date: Mon, 20 Jul 2015 12:42:00 -0000	[thread overview]
Message-ID: <CAMbmDYZ0BUOWpqM50a4g4bOkXJ9AOJfAfqNWq_6VS_vbhm0gtg@mail.gmail.com> (raw)
In-Reply-To: <CAMbmDYamtv_0WrNnew39XPC6c6yG8C+TYjXK5BNgir_UP5ReiQ@mail.gmail.com>

Ping

2015-07-13 11:47 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
> Ping
>
> 2015-06-18 12:54 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
>> Hi,
>>
>> In early_inliner we do recompute inline summaries for edges after optimize_inline_calls, but check this summary exists in case new edges appear.  But then it calls inline_update_overall_summary which also going through edges inline summaries but with no check this time causing segfault.  This patch fixes it.  Bootstrapped and regtested for x86_64-unknown-linux-gnu.  Is it OK for trunk and gcc-5-branch?
>>
>> Thanks,
>> Ilya
>> --
>> gcc/
>>
>> 2015-06-18  Ilya Enkovich  <enkovich.gnu@gmail.com>
>>
>>         PR ipa/66566
>>         * ipa-inline-analysis.c (estimate_calls_size_and_time): Check
>>         edge summary is available.
>>
>> gcc/testsuite/
>>
>> 2015-06-18  Ilya Enkovich  <enkovich.gnu@gmail.com>
>>
>>         PR ipa/66566
>>         * gcc.target/i386/mpx/pr66566.c: New test.
>>
>>
>> diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
>> index bbde855..e910ac5 100644
>> --- a/gcc/ipa-inline-analysis.c
>> +++ b/gcc/ipa-inline-analysis.c
>> @@ -3122,6 +3122,9 @@ estimate_calls_size_and_time (struct cgraph_node *node, int *size,
>>    struct cgraph_edge *e;
>>    for (e = node->callees; e; e = e->next_callee)
>>      {
>> +      if (inline_edge_summary_vec.length () <= (unsigned) e->uid)
>> +       continue;
>> +
>>        struct inline_edge_summary *es = inline_edge_summary (e);
>>
>>        /* Do not care about zero sized builtins.  */
>> @@ -3153,6 +3156,9 @@ estimate_calls_size_and_time (struct cgraph_node *node, int *size,
>>      }
>>    for (e = node->indirect_calls; e; e = e->next_callee)
>>      {
>> +      if (inline_edge_summary_vec.length () <= (unsigned) e->uid)
>> +       continue;
>> +
>>        struct inline_edge_summary *es = inline_edge_summary (e);
>>        if (!es->predicate
>>           || evaluate_predicate (es->predicate, possible_truths))
>> diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66566.c b/gcc/testsuite/gcc.target/i386/mpx/pr66566.c
>> new file mode 100644
>> index 0000000..a405c20
>> --- /dev/null
>> +++ b/gcc/testsuite/gcc.target/i386/mpx/pr66566.c
>> @@ -0,0 +1,12 @@
>> +/* { dg-do compile } */
>> +/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */
>> +
>> +union jsval_layout
>> +{
>> +  void *asPtr;
>> +};
>> +union jsval_layout a;
>> +union jsval_layout b;
>> +union jsval_layout __inline__ fn1() { return b; }
>> +
>> +void fn2() { a = fn1(); }

  reply	other threads:[~2015-07-20 12:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18  9:55 Ilya Enkovich
2015-07-13  8:48 ` Ilya Enkovich
2015-07-20 12:42   ` Ilya Enkovich [this message]
2015-07-23 20:48     ` Jeff Law

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=CAMbmDYZ0BUOWpqM50a4g4bOkXJ9AOJfAfqNWq_6VS_vbhm0gtg@mail.gmail.com \
    --to=enkovich.gnu@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /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).