public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902
@ 2013-08-30 10:14 evstupac at gmail dot com
  2013-08-30 10:23 ` [Bug ipa/58279] " mpolacek at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: evstupac at gmail dot com @ 2013-08-30 10:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58279
           Summary: Interanl compiler error while pgo compilation at
                    ipa-inline.c:902
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evstupac at gmail dot com

CoreMark (www.coremark.org) build with:

make PORT_DIR=linux64 XCFLAGS="-fprofile-generate -DTOTAL_DATA_SIZE=1200
-DPROFILE_RUN=1 -DMULTITHREAD=1 -DMEM_METHOD=MEM_STATIC" REBUILD=1 run3.log;
make PORT_DIR=linux64 XCFLAGS="-fprofile-use -DMULTITHREAD=1
-DMEM_METHOD=MEM_STATIC" REBUILD=1 run1.log

Generates ICE on 4.8 and 4.9 GCC:

internal compiler error: in edge_badness, at ipa-inline.c:902
 }
 ^
0xd76dbb edge_badness
        gcc/ipa-inline.c:902
0x4f428d add_new_edges_to_heap
        gcc/ipa-inline.c:1391
0xd7a34d inline_small_functions
        gcc/ipa-inline.c:1743
0xd7a34d ipa_inline
        gcc/ipa-inline.c:1924
0xd7a34d execute
        gcc/ipa-inline.c:2320
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
@ 2013-08-30 10:23 ` mpolacek at gcc dot gnu.org
  2013-08-30 10:31 ` evstupac at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-08-30 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-08-30
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Please submit a full bug report,
with preprocessed source if appropriate.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
  2013-08-30 10:23 ` [Bug ipa/58279] " mpolacek at gcc dot gnu.org
@ 2013-08-30 10:31 ` evstupac at gmail dot com
  2013-08-30 10:39   ` pinskia
  2013-08-30 10:39 ` pinskia at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 12+ messages in thread
From: evstupac at gmail dot com @ 2013-08-30 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Stupachenko Evgeny <evstupac at gmail dot com> ---
I can't share CoreMark sources.
However, you can get them at www.coremark.org when accept the license.

The error caused by edge->count of new edges which is grater than max_count:
(line 902)
gcc_assert (max_count >= edge->count);

The new edge is generated in case of indirect inline:

(line 1517)
if (flag_indirect_inlining)    
  new_indirect_edges.create (8);

and does not participate in max_count calculation, but refers to it when adding
to a heap:

(lines 1724 and 1761)
if (flag_indirect_inlining)                            
  add_new_edges_to_heap (edge_heap, new_indirect_edges);

Updating max_count with new_edges counts resolves the ICE.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:31 ` evstupac at gmail dot com
@ 2013-08-30 10:39   ` pinskia
  0 siblings, 0 replies; 12+ messages in thread
From: pinskia @ 2013-08-30 10:39 UTC (permalink / raw)
  To: evstupac at gmail dot com; +Cc: gcc-bugs

I have a fix which I hope to share in the next few weeks.

Sent from my iPad

On Aug 30, 2013, at 3:31 AM, "evstupac at gmail dot com" <gcc-bugzilla@gcc.gnu.org> wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58279
> 
> --- Comment #2 from Stupachenko Evgeny <evstupac at gmail dot com> ---
> I can't share CoreMark sources.
> However, you can get them at www.coremark.org when accept the license.
> 
> The error caused by edge->count of new edges which is grater than max_count:
> (line 902)
> gcc_assert (max_count >= edge->count);
> 
> The new edge is generated in case of indirect inline:
> 
> (line 1517)
> if (flag_indirect_inlining)    
>  new_indirect_edges.create (8);
> 
> and does not participate in max_count calculation, but refers to it when adding
> to a heap:
> 
> (lines 1724 and 1761)
> if (flag_indirect_inlining)                            
>  add_new_edges_to_heap (edge_heap, new_indirect_edges);
> 
> Updating max_count with new_edges counts resolves the ICE.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
  2013-08-30 10:23 ` [Bug ipa/58279] " mpolacek at gcc dot gnu.org
  2013-08-30 10:31 ` evstupac at gmail dot com
@ 2013-08-30 10:39 ` pinskia at gmail dot com
  2013-11-12 13:41 ` evstupac at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gmail dot com @ 2013-08-30 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from pinskia at gmail dot com <pinskia at gmail dot com> ---
I have a fix which I hope to share in the next few weeks.

Sent from my iPad

On Aug 30, 2013, at 3:31 AM, "evstupac at gmail dot com"
<gcc-bugzilla@gcc.gnu.org> wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58279
> 
> --- Comment #2 from Stupachenko Evgeny <evstupac at gmail dot com> ---
> I can't share CoreMark sources.
> However, you can get them at www.coremark.org when accept the license.
> 
> The error caused by edge->count of new edges which is grater than max_count:
> (line 902)
> gcc_assert (max_count >= edge->count);
> 
> The new edge is generated in case of indirect inline:
> 
> (line 1517)
> if (flag_indirect_inlining)    
>  new_indirect_edges.create (8);
> 
> and does not participate in max_count calculation, but refers to it when adding
> to a heap:
> 
> (lines 1724 and 1761)
> if (flag_indirect_inlining)                            
>  add_new_edges_to_heap (edge_heap, new_indirect_edges);
> 
> Updating max_count with new_edges counts resolves the ICE.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
                   ` (2 preceding siblings ...)
  2013-08-30 10:39 ` pinskia at gmail dot com
@ 2013-11-12 13:41 ` evstupac at gmail dot com
  2013-12-02  8:54 ` evstupac at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: evstupac at gmail dot com @ 2013-11-12 13:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Stupachenko Evgeny <evstupac at gmail dot com> ---
Not reproduced on trunk(4.9) any more.
Still reproduced on 4.8.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
                   ` (3 preceding siblings ...)
  2013-11-12 13:41 ` evstupac at gmail dot com
@ 2013-12-02  8:54 ` evstupac at gmail dot com
  2013-12-02 13:25 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: evstupac at gmail dot com @ 2013-12-02  8:54 UTC (permalink / raw)
  To: gcc-bugs

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

Stupachenko Evgeny <evstupac at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.9.0                       |4.8.3

--- Comment #5 from Stupachenko Evgeny <evstupac at gmail dot com> ---
It is still reproduced on 4.8 compiler.
Do you have a patch on this?


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
                   ` (4 preceding siblings ...)
  2013-12-02  8:54 ` evstupac at gmail dot com
@ 2013-12-02 13:25 ` hjl.tools at gmail dot com
  2013-12-04 14:51 ` evstupac at gmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-02 13:25 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Stupachenko Evgeny from comment #4)
> Not reproduced on trunk(4.9) any more.
> Still reproduced on 4.8.

You can bisect trunk to see which checkin fixes it.
Is this a regression on 4.8 branch?


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
                   ` (5 preceding siblings ...)
  2013-12-02 13:25 ` hjl.tools at gmail dot com
@ 2013-12-04 14:51 ` evstupac at gmail dot com
  2013-12-04 14:59 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: evstupac at gmail dot com @ 2013-12-04 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Stupachenko Evgeny <evstupac at gmail dot com> ---
Created attachment 31379
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31379&action=edit
patch to ipa-inline.c for 4.8


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
                   ` (6 preceding siblings ...)
  2013-12-04 14:51 ` evstupac at gmail dot com
@ 2013-12-04 14:59 ` hjl.tools at gmail dot com
  2013-12-04 15:05 ` evstupac at gmail dot com
  2013-12-04 15:42 ` hjl.tools at gmail dot com
  9 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-04 14:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Stupachenko Evgeny from comment #7)
> Created attachment 31379 [details]
> patch to ipa-inline.c for 4.8

Is this a backport from trunk? If yes, please identify which
checkin on trunk fixes it.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
                   ` (7 preceding siblings ...)
  2013-12-04 14:59 ` hjl.tools at gmail dot com
@ 2013-12-04 15:05 ` evstupac at gmail dot com
  2013-12-04 15:42 ` hjl.tools at gmail dot com
  9 siblings, 0 replies; 12+ messages in thread
From: evstupac at gmail dot com @ 2013-12-04 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Stupachenko Evgeny <evstupac at gmail dot com> ---
r203897 | pmatos | 2013-10-21 19:41:46 +0400 (Mon, 21 Oct 2013) | 4 lines

        * ipa-inline.c (edge_badness): Cap edge->count at max_count for badness
        calculations.

fixes the issue in trunk.

To be consistent we should apply the patch (attached) to 4.8 GCC as well.
However I believe we should update max_count when adding new edges, but not
edge_count.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug ipa/58279] Interanl compiler error while pgo compilation at ipa-inline.c:902
  2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
                   ` (8 preceding siblings ...)
  2013-12-04 15:05 ` evstupac at gmail dot com
@ 2013-12-04 15:42 ` hjl.tools at gmail dot com
  9 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-04 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
I closed it as dup of PR 58682.  If PR 58682 is a regression
on 4.8, please reopen PR 58682 and request the backport.

*** This bug has been marked as a duplicate of bug 58682 ***


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-12-04 15:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 10:14 [Bug ipa/58279] New: Interanl compiler error while pgo compilation at ipa-inline.c:902 evstupac at gmail dot com
2013-08-30 10:23 ` [Bug ipa/58279] " mpolacek at gcc dot gnu.org
2013-08-30 10:31 ` evstupac at gmail dot com
2013-08-30 10:39   ` pinskia
2013-08-30 10:39 ` pinskia at gmail dot com
2013-11-12 13:41 ` evstupac at gmail dot com
2013-12-02  8:54 ` evstupac at gmail dot com
2013-12-02 13:25 ` hjl.tools at gmail dot com
2013-12-04 14:51 ` evstupac at gmail dot com
2013-12-04 14:59 ` hjl.tools at gmail dot com
2013-12-04 15:05 ` evstupac at gmail dot com
2013-12-04 15:42 ` hjl.tools at gmail dot com

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