public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/57539] New: ice in ipa_edge_duplication_hook
@ 2013-06-06  8:55 dcb314 at hotmail dot com
  2013-06-06 10:43 ` [Bug tree-optimization/57539] [4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2013-06-06  8:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57539
           Summary: ice in ipa_edge_duplication_hook
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

Created attachment 30265
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30265&action=edit
C source code

The attached source code causes the following crash
on gcc-4.9 trunk dated 20130605 on an AMD x86_64 box
when compiled with -O3.

constraint.c:1011:1: internal compiler error: in ipa_edge_duplication_hook, at
ipa-prop.c:2836
0x7cba11 ipa_edge_duplication_hook
    ../../src/trunk/gcc/ipa-prop.c:2836
0x624f2b cgraph_call_edge_duplication_hooks(cgraph_edge*, cgraph_edge*)
    ../../src/trunk/gcc/cgraph.c:438
0x62f831 cgraph_clone_edge(cgraph_edge*, cgraph_node*, gimple_statement_d*,
unsigned int, long, int, bool)
    ../../src/trunk/gcc/cgraphclones.c:156
0x62fcbc cgraph_clone_node(cgraph_node*, tree_node*, long, int, bool,
vec<cgraph_edge*, va_heap, vl_ptr>, bool)
    ../../src/trunk/gcc/cgraphclones.c:229
0xd73655 clone_inlined_nodes(cgraph_edge*, bool, bool, int*)
    ../../src/trunk/gcc/ipa-inline-transform.c:171
0xd736a8 clone_inlined_nodes(cgraph_edge*, bool, bool, int*)
    ../../src/trunk/gcc/ipa-inline-transform.c:186
0xd73974 inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*,
int*, bool)
    ../../src/trunk/gcc/ipa-inline-transform.c:248
0xd72169 inline_small_functions
    ../../src/trunk/gcc/ipa-inline.c:1615
0xd72169 ipa_inline
    ../../src/trunk/gcc/ipa-inline.c:1796
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] 7+ messages in thread

* [Bug tree-optimization/57539] [4.9 Regression] ice in ipa_edge_duplication_hook
  2013-06-06  8:55 [Bug c/57539] New: ice in ipa_edge_duplication_hook dcb314 at hotmail dot com
@ 2013-06-06 10:43 ` rguenth at gcc dot gnu.org
  2013-06-06 10:58 ` jamborm at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-06-06 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjambor at suse dot cz
          Component|c                           |tree-optimization
   Target Milestone|---                         |4.9.0
            Summary|ice in                      |[4.9 Regression] ice in
                   |ipa_edge_duplication_hook   |ipa_edge_duplication_hook


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

* [Bug tree-optimization/57539] [4.9 Regression] ice in ipa_edge_duplication_hook
  2013-06-06  8:55 [Bug c/57539] New: ice in ipa_edge_duplication_hook dcb314 at hotmail dot com
  2013-06-06 10:43 ` [Bug tree-optimization/57539] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-06-06 10:58 ` jamborm at gcc dot gnu.org
  2013-06-07 17:11 ` jamborm at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-06-06 10:58 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-06-06
                 CC|mjambor at suse dot cz             |jamborm at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Confirmed, mine.


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

* [Bug tree-optimization/57539] [4.9 Regression] ice in ipa_edge_duplication_hook
  2013-06-06  8:55 [Bug c/57539] New: ice in ipa_edge_duplication_hook dcb314 at hotmail dot com
  2013-06-06 10:43 ` [Bug tree-optimization/57539] [4.9 Regression] " rguenth at gcc dot gnu.org
  2013-06-06 10:58 ` jamborm at gcc dot gnu.org
@ 2013-06-07 17:11 ` jamborm at gcc dot gnu.org
  2013-06-10 17:47 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-06-07 17:11 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The main reason why the code does not work is that when
ipa_edge_duplication_hook is invoked, dst->caller does not yet have
its global.inlined_to set (it does not have any callers either) and so
we cannot use it to figure out which copy of rdesc in the list is the
one describing the new tree of inline clones.  This means that this
whole copying/re-mapping should be moved out of the hook into a
specialized function called from clone_inlined_nodes.

Additionally, and this has confused me for hours, we also do not even
create the rdesc we want to map a different edge to in this particular
testcase.  That is because an originally indirect edge is involved and
the call to ipa_free_edge_args_substructures in
ipa_propagate_indirect_call_infos.  That deallocated the vector of
jump functions, so the loop over it in the hook did not do anything.
That call needs to be removed.


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

* [Bug tree-optimization/57539] [4.9 Regression] ice in ipa_edge_duplication_hook
  2013-06-06  8:55 [Bug c/57539] New: ice in ipa_edge_duplication_hook dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2013-06-07 17:11 ` jamborm at gcc dot gnu.org
@ 2013-06-10 17:47 ` jamborm at gcc dot gnu.org
  2013-06-14 10:02 ` jamborm at gcc dot gnu.org
  2013-06-24 12:42 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-06-10 17:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Created attachment 30286
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30286&action=edit
Proposed fix

I'm currently bootstrapping and testing this patch to fix the issue.  I'll give
one more thought to creating a testcase for the testsuite but constructing one
is not entirely trivial.


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

* [Bug tree-optimization/57539] [4.9 Regression] ice in ipa_edge_duplication_hook
  2013-06-06  8:55 [Bug c/57539] New: ice in ipa_edge_duplication_hook dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2013-06-10 17:47 ` jamborm at gcc dot gnu.org
@ 2013-06-14 10:02 ` jamborm at gcc dot gnu.org
  2013-06-24 12:42 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-06-14 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2013-06/msg00661.htm
                   |                            |l

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I have submitted the fix to the mailing list:

http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00661.html


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

* [Bug tree-optimization/57539] [4.9 Regression] ice in ipa_edge_duplication_hook
  2013-06-06  8:55 [Bug c/57539] New: ice in ipa_edge_duplication_hook dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2013-06-14 10:02 ` jamborm at gcc dot gnu.org
@ 2013-06-24 12:42 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-06-24 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Mon Jun 24 12:40:17 2013
New Revision: 200368

URL: http://gcc.gnu.org/viewcvs?rev=200368&root=gcc&view=rev
Log:
2013-06-24  Martin Jambor  <mjambor@suse.cz>

    PR tree-optimization/57539
    * cgraphclones.c (cgraph_clone_node): Add parameter new_inlined_to, set
    global.inlined_to of the new node to it.  All callers changed.
    * ipa-inline-transform.c (clone_inlined_nodes): New variable
    inlining_into, pass it to cgraph_clone_node.
    * ipa-prop.c (ipa_propagate_indirect_call_infos): Do not call
    ipa_free_edge_args_substructures.
    (ipa_edge_duplication_hook): Only add edges from inlined nodes to
    rdesc linked list.  Do not assert rdesc edges have inlined caller.
    Assert we have found an rdesc in the rdesc list.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cgraph.h
    trunk/gcc/cgraphclones.c
    trunk/gcc/ipa-inline-transform.c
    trunk/gcc/ipa-inline.c
    trunk/gcc/ipa-prop.c
    trunk/gcc/lto-cgraph.c


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-06  8:55 [Bug c/57539] New: ice in ipa_edge_duplication_hook dcb314 at hotmail dot com
2013-06-06 10:43 ` [Bug tree-optimization/57539] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-06-06 10:58 ` jamborm at gcc dot gnu.org
2013-06-07 17:11 ` jamborm at gcc dot gnu.org
2013-06-10 17:47 ` jamborm at gcc dot gnu.org
2013-06-14 10:02 ` jamborm at gcc dot gnu.org
2013-06-24 12:42 ` jamborm at gcc dot gnu.org

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