public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/102388] New: [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d
@ 2021-09-17 18:45 marxin at gcc dot gnu.org
  2021-09-17 18:45 ` [Bug ipa/102388] " marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-17 18:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102388

            Bug ID: 102388
           Summary: [12 Regression] ICE in duplicate, at ipa-prop.c:4436
                    since r12-2523-g13586172d0b70c9d
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jamborm at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 51474
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51474&action=edit
test-case

It's reduced from 523.xalancbmk_r.

$ g++ ice2/*.ii -O2 -flto -fno-ipa-modref
...
during IPA pass: inline
lto1: internal compiler error: in duplicate, at ipa-prop.c:4436
0x6c5062 ipa_edge_args_sum_t::duplicate(cgraph_edge*, cgraph_edge*,
ipa_edge_args*, ipa_edge_args*)
        /home/marxin/Programming/gcc/gcc/ipa-prop.c:4436
0x91c69b symbol_table::call_edge_duplication_hooks(cgraph_edge*, cgraph_edge*)
        /home/marxin/Programming/gcc/gcc/cgraph.c:454
0x9214f6 cgraph_edge::make_speculative(cgraph_node*, profile_count, unsigned
int)
        /home/marxin/Programming/gcc/gcc/cgraph.c:1127
0xba03ae try_make_edge_direct_simple_call
        /home/marxin/Programming/gcc/gcc/ipa-prop.c:3780
0xba03ae update_indirect_edges_after_inlining
        /home/marxin/Programming/gcc/gcc/ipa-prop.c:4000
0xba03ae propagate_info_to_inlined_callees
        /home/marxin/Programming/gcc/gcc/ipa-prop.c:4092
0xb9fcf0 propagate_info_to_inlined_callees
        /home/marxin/Programming/gcc/gcc/ipa-prop.c:4096
0xba0bbb ipa_propagate_indirect_call_infos(cgraph_edge*, vec<cgraph_edge*,
va_heap, vl_ptr>*)
        /home/marxin/Programming/gcc/gcc/ipa-prop.c:4272
0xb6c98d inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*,
int*, bool, bool*)
        /home/marxin/Programming/gcc/gcc/ipa-inline-transform.c:508
0x1aa8ff9 inline_to_all_callers_1
        /home/marxin/Programming/gcc/gcc/ipa-inline.c:2462
0x1aa8ff9 inline_to_all_callers
        /home/marxin/Programming/gcc/gcc/ipa-inline.c:2487
0x1aaa6ba cgraph_node::call_for_symbol_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool)
        /home/marxin/Programming/gcc/gcc/cgraph.h:3403
0x1aaa6ba ipa_inline
        /home/marxin/Programming/gcc/gcc/ipa-inline.c:2812
0x1aaa6ba execute
        /home/marxin/Programming/gcc/gcc/ipa-inline.c:3142
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status

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

* [Bug ipa/102388] [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d
  2021-09-17 18:45 [Bug ipa/102388] New: [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d marxin at gcc dot gnu.org
@ 2021-09-17 18:45 ` marxin at gcc dot gnu.org
  2021-09-20 17:21 ` jamborm at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-17 18:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102388

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Target Milestone|---                         |12.0
   Last reconfirmed|                            |2021-09-17
      Known to work|                            |11.2.0
      Known to fail|                            |12.0
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW

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

* [Bug ipa/102388] [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d
  2021-09-17 18:45 [Bug ipa/102388] New: [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d marxin at gcc dot gnu.org
  2021-09-17 18:45 ` [Bug ipa/102388] " marxin at gcc dot gnu.org
@ 2021-09-20 17:21 ` jamborm at gcc dot gnu.org
  2021-09-23 17:29 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-09-20 17:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102388

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org

--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Mine, looks like a lot of fun.

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

* [Bug ipa/102388] [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d
  2021-09-17 18:45 [Bug ipa/102388] New: [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d marxin at gcc dot gnu.org
  2021-09-17 18:45 ` [Bug ipa/102388] " marxin at gcc dot gnu.org
  2021-09-20 17:21 ` jamborm at gcc dot gnu.org
@ 2021-09-23 17:29 ` jamborm at gcc dot gnu.org
  2021-10-07 14:22 ` cvs-commit at gcc dot gnu.org
  2021-10-07 14:29 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-09-23 17:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102388

--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I proposed a fix on the mailing list:
https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580183.html

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

* [Bug ipa/102388] [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d
  2021-09-17 18:45 [Bug ipa/102388] New: [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-09-23 17:29 ` jamborm at gcc dot gnu.org
@ 2021-10-07 14:22 ` cvs-commit at gcc dot gnu.org
  2021-10-07 14:29 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-07 14:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102388

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:1a7d452c092be42a892d00c19561af10f42410b0

commit r12-4230-g1a7d452c092be42a892d00c19561af10f42410b0
Author: Martin Jambor <mjambor@suse.cz>
Date:   Thu Oct 7 16:21:19 2021 +0200

    ipa: Fix ICE when speculating calls from inlined functions (PR 102388)

    The code handling various cases which lead to call graph edge
    duplication (in order to update reference descriptions used to track
    and remove no-longer needed references) has missed one important case.

    When edge duplication is an effect of creating a speculative edge for
    an indirect edge which carries a constant jump function which had been
    created from a pass-through function when the edge caller has was
    inlined into one of its callers, the reference description attached to
    the function describes an edge higher up in the "inlined" clone tree
    and so even the new speculative edge will.  Therefore we should not
    try to duplicate the reference description itself but rather just bump
    the refcount of the existing one.

    gcc/ChangeLog:

    2021-09-22  Martin Jambor  <mjambor@suse.cz>

            PR ipa/102388
            * ipa-prop.c (ipa_edge_args_sum_t::duplicate): Also handle the
            case when the source reference description corresponds to a
            referance taken in a function src->caller is inlined to.

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

* [Bug ipa/102388] [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d
  2021-09-17 18:45 [Bug ipa/102388] New: [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-10-07 14:22 ` cvs-commit at gcc dot gnu.org
@ 2021-10-07 14:29 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-10-07 14:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102388

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

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

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-10-07 14:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 18:45 [Bug ipa/102388] New: [12 Regression] ICE in duplicate, at ipa-prop.c:4436 since r12-2523-g13586172d0b70c9d marxin at gcc dot gnu.org
2021-09-17 18:45 ` [Bug ipa/102388] " marxin at gcc dot gnu.org
2021-09-20 17:21 ` jamborm at gcc dot gnu.org
2021-09-23 17:29 ` jamborm at gcc dot gnu.org
2021-10-07 14:22 ` cvs-commit at gcc dot gnu.org
2021-10-07 14:29 ` 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).