* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2)
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
@ 2022-08-31 7:48 ` amonakov at gcc dot gnu.org
2022-08-31 8:23 ` [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95 marxin at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: amonakov at gcc dot gnu.org @ 2022-08-31 7:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Thanks.
Also ICEs in ipa-modref when 'noclone' added to 'noinline', a 12/13 regression
(different cause, needs a separate PR).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
2022-08-31 7:48 ` [Bug tree-optimization/106781] " amonakov at gcc dot gnu.org
@ 2022-08-31 8:23 ` marxin at gcc dot gnu.org
2022-08-31 8:24 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-08-31 8:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2022-08-31
Summary|[13 Regression] ICE: |[13 Regression] ICE:
|verify_flow_info failed |verify_flow_info failed
|(error: returns_twice call |(error: returns_twice call
|is not first in basic block |is not first in basic block
|2) |2) since
| |r13-1754-g7a158a5776f5ca95
Status|UNCONFIRMED |NEW
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
So this one started with r13-1754-g7a158a5776f5ca95.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
2022-08-31 7:48 ` [Bug tree-optimization/106781] " amonakov at gcc dot gnu.org
2022-08-31 8:23 ` [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95 marxin at gcc dot gnu.org
@ 2022-08-31 8:24 ` marxin at gcc dot gnu.org
2022-08-31 8:59 ` amonakov at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-08-31 8:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Alexander Monakov from comment #1)
> Thanks.
>
> Also ICEs in ipa-modref when 'noclone' added to 'noinline', a 12/13
> regression (different cause, needs a separate PR).
Can't reproduce Alexander, please attach a testcase.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
` (2 preceding siblings ...)
2022-08-31 8:24 ` marxin at gcc dot gnu.org
@ 2022-08-31 8:59 ` amonakov at gcc dot gnu.org
2022-08-31 12:17 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: amonakov at gcc dot gnu.org @ 2022-08-31 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
--- Comment #4 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> > Also ICEs in ipa-modref when 'noclone' added to 'noinline', a 12/13
> > regression (different cause, needs a separate PR).
>
> Can't reproduce Alexander, please attach a testcase.
Ah, it ICEs when emitting a dump, so -fdump-tree-modref2 is needed in addition
to -O2, I've filed that as PR 106783.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
` (3 preceding siblings ...)
2022-08-31 8:59 ` amonakov at gcc dot gnu.org
@ 2022-08-31 12:17 ` rguenth at gcc dot gnu.org
2022-08-31 13:37 ` amonakov at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-31 12:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Keywords| |ice-checking
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
` (4 preceding siblings ...)
2022-08-31 12:17 ` rguenth at gcc dot gnu.org
@ 2022-08-31 13:37 ` amonakov at gcc dot gnu.org
2022-10-19 7:01 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: amonakov at gcc dot gnu.org @ 2022-08-31 13:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
GCC discovers that 'bar' is noreturn, tries to remove its LHS but unfortunately
cgraph.cc:cgraph_edge::redirect_call_stmt_to_callee wants to emit an assignment
of SSA default-def to the LHS. fixup_noreturn_call seems to handle that in a
smarter way.
Is it possible to simply let fixup_noreturn_call do its thing?
diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc
index 8d6ed38ef..6597de669 100644
--- a/gcc/cgraph.cc
+++ b/gcc/cgraph.cc
@@ -1567,7 +1567,7 @@ cgraph_edge::redirect_call_stmt_to_callee (cgraph_edge
*e)
/* If the call becomes noreturn, remove the LHS if possible. */
tree lhs = gimple_call_lhs (new_stmt);
- if (lhs
+ if (0 && lhs
&& gimple_call_noreturn_p (new_stmt)
&& (VOID_TYPE_P (TREE_TYPE (gimple_call_fntype (new_stmt)))
|| should_remove_lhs_p (lhs)))
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
` (5 preceding siblings ...)
2022-08-31 13:37 ` amonakov at gcc dot gnu.org
@ 2022-10-19 7:01 ` rguenth at gcc dot gnu.org
2022-10-19 8:56 ` cvs-commit at gcc dot gnu.org
2022-10-19 8:56 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-19 7:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
` (6 preceding siblings ...)
2022-10-19 7:01 ` rguenth at gcc dot gnu.org
@ 2022-10-19 8:56 ` cvs-commit at gcc dot gnu.org
2022-10-19 8:56 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-19 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:32ab9238d86dfa6d74d3592bec570f4f257d0413
commit r13-3370-g32ab9238d86dfa6d74d3592bec570f4f257d0413
Author: Richard Biener <rguenther@suse.de>
Date: Wed Oct 19 09:01:56 2022 +0200
tree-optimization/106781 - adjust cgraph lhs removal
The following matches up the cgraph code removing LHS of a noreturn
call with what fixup_noreturn_call does which gets along without
inserting a definition, fixing the ICE resulting from having no
place to actually insert that new def.
PR tree-optimization/106781
* cgraph.cc (cgraph_edge::redirect_call_stmt_to_callee): Copy
LHS removal from fixup_noreturn_call.
* gcc.dg/pr106781.c: New testcase.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/106781] [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) since r13-1754-g7a158a5776f5ca95
2022-08-31 7:11 [Bug tree-optimization/106781] New: [13 Regression] ICE: verify_flow_info failed (error: returns_twice call is not first in basic block 2) asolokha at gmx dot com
` (7 preceding siblings ...)
2022-10-19 8:56 ` cvs-commit at gcc dot gnu.org
@ 2022-10-19 8:56 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-19 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106781
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread