public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505
@ 2022-09-13 19:33 gscfq@t-online.de
  2022-09-13 19:39 ` [Bug ipa/106935] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gscfq@t-online.de @ 2022-09-13 19:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106935
           Summary: [12/13 Regression] ICE in
                    redirect_call_stmt_to_callee, at cgraph.cc:1505
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20211114 and 20211121, at -Ofast,
with file g++.dg/ipa/pr71146.C :
(gcc configured with --enable-checking=yes)


$ g++-13-20220911 -c pr71146.C -m32 -mandroid --param ipa-cp-eval-threshold=200
-O3
$
$ g++-13-20220911 -c pr71146.C -m32 -mandroid --param ipa-cp-eval-threshold=200
-Ofast
during IPA pass: inline
pr71146.C: In member function 'void C::fn2()':
pr71146.C:20:11: internal compiler error: in redirect_call_stmt_to_callee, at
cgraph.cc:1505
   20 |   foo->fn (0, 0, 0);
      |   ~~~~~~~~^~~~~~~~~
0xc9e883 cgraph_edge::redirect_call_stmt_to_callee(cgraph_edge*)
        ../../gcc/cgraph.cc:1505
0x1260f1f redirect_all_calls(copy_body_data*, basic_block_def*)
        ../../gcc/tree-inline.cc:3002
0x12645d3 copy_cfg_body
        ../../gcc/tree-inline.cc:3157
0x12645d3 copy_body
        ../../gcc/tree-inline.cc:3338
0x1267898 expand_call_inline
        ../../gcc/tree-inline.cc:5123
0x1269919 gimple_expand_calls_inline
        ../../gcc/tree-inline.cc:5318
0x1269919 optimize_inline_calls(tree_node*)
        ../../gcc/tree-inline.cc:5490
0xf2bc6b inline_transform(cgraph_node*)
        ../../gcc/ipa-inline-transform.cc:790
0x10c2e50 execute_one_ipa_transform_pass
        ../../gcc/passes.cc:2336
0x10c2e50 execute_all_ipa_transforms(bool)
        ../../gcc/passes.cc:2399
0xca5875 cgraph_node::expand()
        ../../gcc/cgraphunit.cc:1827
0xca7216 expand_all_functions
        ../../gcc/cgraphunit.cc:1998
0xca7216 symbol_table::compile()
        ../../gcc/cgraphunit.cc:2348
0xcaa8ef symbol_table::compile()
        ../../gcc/cgraphunit.cc:2532
0xcaa8ef symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.cc:2529

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

* [Bug ipa/106935] [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505
  2022-09-13 19:33 [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 gscfq@t-online.de
@ 2022-09-13 19:39 ` pinskia at gcc dot gnu.org
  2022-09-13 20:10 ` [Bug ipa/106935] [10/11/12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797 marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-09-13 19:39 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
   Target Milestone|---                         |12.3
          Component|c++                         |ipa
           Keywords|                            |needs-bisection

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

* [Bug ipa/106935] [10/11/12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797
  2022-09-13 19:33 [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 gscfq@t-online.de
  2022-09-13 19:39 ` [Bug ipa/106935] " pinskia at gcc dot gnu.org
@ 2022-09-13 20:10 ` marxin at gcc dot gnu.org
  2022-09-14  7:03 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-09-13 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |fxue at gcc dot gnu.org
            Summary|[12/13 Regression] ICE in   |[10/11/12/13 Regression]
                   |redirect_call_stmt_to_calle |ICE in
                   |e, at cgraph.cc:1505        |redirect_call_stmt_to_calle
                   |                            |e, at cgraph.cc:1505 since
                   |                            |r10-5098-g9b14fc3326e08797
   Last reconfirmed|                            |2022-09-13

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
With -m32 -mandroid --param ipa-cp-eval-threshold=200 -Ofast
-fno-semantic-interposition

it started since r10-5098-g9b14fc3326e08797.

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

* [Bug ipa/106935] [10/11/12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797
  2022-09-13 19:33 [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 gscfq@t-online.de
  2022-09-13 19:39 ` [Bug ipa/106935] " pinskia at gcc dot gnu.org
  2022-09-13 20:10 ` [Bug ipa/106935] [10/11/12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797 marxin at gcc dot gnu.org
@ 2022-09-14  7:03 ` rguenth at gcc dot gnu.org
  2023-05-08 12:25 ` [Bug ipa/106935] [10/11/12/13/14 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-14  7:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug ipa/106935] [10/11/12/13/14 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797
  2022-09-13 19:33 [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2022-09-14  7:03 ` rguenth at gcc dot gnu.org
@ 2023-05-08 12:25 ` rguenth at gcc dot gnu.org
  2024-04-30 13:23 ` [Bug ipa/106935] [11/12/13/14/15 " jamborm at gcc dot gnu.org
  2024-05-10 15:28 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.3                        |12.4

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

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

* [Bug ipa/106935] [11/12/13/14/15 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797
  2022-09-13 19:33 [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2023-05-08 12:25 ` [Bug ipa/106935] [10/11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-04-30 13:23 ` jamborm at gcc dot gnu.org
  2024-05-10 15:28 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-04-30 13:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
This ICE no longer happens with GCC 13, in fact after r13-4240-gfeeb0d68f1c708
(Martin Jambor: ipa-cp: Do not consider useless aggregate constants).  From the
patch description, it does not look to be a fix of the underlying issue.

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

* [Bug ipa/106935] [11/12/13/14/15 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797
  2022-09-13 19:33 [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2024-04-30 13:23 ` [Bug ipa/106935] [11/12/13/14/15 " jamborm at gcc dot gnu.org
@ 2024-05-10 15:28 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-05-10 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
We hit an assert guarding that we have not already massaged call
arguments before modifying them during call redirection as that would
end up in wring code.  We do that by looking first whether the decl in
the statement is the same as the decl of the cgraph_edge callee and if
not, if the node associated with the decl from the statement has any
parameter adjustment info.

The issue here is that we are in the process of inlining an artificial
thunk, which calls to a cgraph_node clone with adjustments from its
inception.  That would normally not be a problem because of the first
check above (both decls would be the same, we don't really redirect
these calls, not even in this case).  But the call is actually
recursive, and so the decl from the call graph edge is one created by
save_inline_function_body whereas the one in the statement is the
original one.

I guess we need to detect this particular situation.

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

end of thread, other threads:[~2024-05-10 15:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 19:33 [Bug c++/106935] New: [12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 gscfq@t-online.de
2022-09-13 19:39 ` [Bug ipa/106935] " pinskia at gcc dot gnu.org
2022-09-13 20:10 ` [Bug ipa/106935] [10/11/12/13 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.cc:1505 since r10-5098-g9b14fc3326e08797 marxin at gcc dot gnu.org
2022-09-14  7:03 ` rguenth at gcc dot gnu.org
2023-05-08 12:25 ` [Bug ipa/106935] [10/11/12/13/14 " rguenth at gcc dot gnu.org
2024-04-30 13:23 ` [Bug ipa/106935] [11/12/13/14/15 " jamborm at gcc dot gnu.org
2024-05-10 15:28 ` 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).