* [Bug c++/113347] ICE during gimplification building TVM
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
@ 2024-01-12 7:17 ` rguenth at gcc dot gnu.org
2024-01-12 7:18 ` rguenth at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-12 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 57047
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57047&action=edit
preprocessed source
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] ICE during gimplification building TVM
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
2024-01-12 7:17 ` [Bug c++/113347] " rguenth at gcc dot gnu.org
@ 2024-01-12 7:18 ` rguenth at gcc dot gnu.org
2024-01-12 7:20 ` [Bug c++/113347] [13 Regression] " rguenth at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-12 7:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code,
| |needs-bisection
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reducing it, bisection to the duplicate bug (if any) would be nice.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [13 Regression] ICE during gimplification building TVM
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
2024-01-12 7:17 ` [Bug c++/113347] " rguenth at gcc dot gnu.org
2024-01-12 7:18 ` rguenth at gcc dot gnu.org
@ 2024-01-12 7:20 ` rguenth at gcc dot gnu.org
2024-01-12 8:10 ` fabian@ritter-vogt.de
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-12 7:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE during gimplification |[13 Regression] ICE during
|building TVM |gimplification building TVM
Target Milestone|--- |13.3
Known to work| |13.2.0
Priority|P3 |P1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, and 13.2.0 worked for me.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [13 Regression] ICE during gimplification building TVM
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2024-01-12 7:20 ` [Bug c++/113347] [13 Regression] " rguenth at gcc dot gnu.org
@ 2024-01-12 8:10 ` fabian@ritter-vogt.de
2024-01-12 8:24 ` [Bug c++/113347] [13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52 rguenth at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: fabian@ritter-vogt.de @ 2024-01-12 8:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Fabian Vogt <fabian@ritter-vogt.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fabian@ritter-vogt.de
--- Comment #4 from Fabian Vogt <fabian@ritter-vogt.de> ---
Created attachment 57048
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57048&action=edit
reduced source
I ran cvise twice, it spat out this minimal reproducer.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2024-01-12 8:10 ` fabian@ritter-vogt.de
@ 2024-01-12 8:24 ` rguenth at gcc dot gnu.org
2024-01-12 8:28 ` [Bug c++/113347] [12/13 " rguenth at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-12 8:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2024-01-12
Status|UNCONFIRMED |NEW
Summary|[13 Regression] ICE during |[13 Regression] ICE during
|gimplification building TVM |gimplification building TVM
| |since
| |r13-8079-gd237e7b291ff52
CC| |jason at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug_tree (*expr_p)
<modify_expr 0x7ffff6bd35c8
type <boolean_type 0x7ffff6a2eb28 bool public unsigned type_6 QI
size <integer_cst 0x7ffff6a300c0 constant 8>
unit-size <integer_cst 0x7ffff6a300d8 constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff6a2eb28 precision:1 min <integer_cst 0x7ffff6a30318 0> max <integer_cst
0x7ffff6a30348 1>>
side-effects readonly
arg:1 <integer_cst 0x7ffff6a30318 type <boolean_type 0x7ffff6a2eb28 bool>
constant 0>>
so the LHS of the MODIFY_EXPR is NULL. This is built by finalize_nrv_r:
/* If a cleanup might throw, we need to clear current_retval_sentinel on
the exception path so an outer cleanup added by
maybe_splice_retval_cleanup doesn't run. */
if (cp_function_chain->throwing_cleanup)
{
tree clear = build2 (MODIFY_EXPR, boolean_type_node,
current_retval_sentinel,
boolean_false_node);
/* We're already only on the EH path, just prepend it. */
tree &exp = CLEANUP_EXPR (*tp);
exp = build2 (COMPOUND_EXPR, void_type_node, clear, exp);
and current_retval_sentinel is NULL here.
Caused by the backport of PR112301, r13-8079-gd237e7b291ff52.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2024-01-12 8:24 ` [Bug c++/113347] [13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52 rguenth at gcc dot gnu.org
@ 2024-01-12 8:28 ` rguenth at gcc dot gnu.org
2024-01-15 7:33 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-12 8:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |12.3.1, 13.2.1
Known to work| |12.3.0
Summary|[13 Regression] ICE during |[12/13 Regression] ICE
|gimplification building TVM |during gimplification
|since |building TVM since
|r13-8079-gd237e7b291ff52 |r13-8079-gd237e7b291ff52
Target Milestone|13.3 |12.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (5 preceding siblings ...)
2024-01-12 8:28 ` [Bug c++/113347] [12/13 " rguenth at gcc dot gnu.org
@ 2024-01-15 7:33 ` rguenth at gcc dot gnu.org
2024-01-15 19:08 ` mpolacek at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-15 7:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-bisection
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'd like to know what fixed it on trunk still so we can decide whether
reverting or backporting sth additional.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (6 preceding siblings ...)
2024-01-15 7:33 ` rguenth at gcc dot gnu.org
@ 2024-01-15 19:08 ` mpolacek at gcc dot gnu.org
2024-01-18 19:16 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-01-15 19:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I cannot figure out what fixed it on trunk because r14-5086 doesn't ICE for me.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (7 preceding siblings ...)
2024-01-15 19:08 ` mpolacek at gcc dot gnu.org
@ 2024-01-18 19:16 ` mpolacek at gcc dot gnu.org
2024-01-22 22:43 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-01-18 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |boris at kolpackov dot net
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 113400 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (8 preceding siblings ...)
2024-01-18 19:16 ` mpolacek at gcc dot gnu.org
@ 2024-01-22 22:43 ` pinskia at gcc dot gnu.org
2024-01-23 20:28 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-22 22:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |csfore at posteo dot net
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 113547 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (9 preceding siblings ...)
2024-01-22 22:43 ` pinskia at gcc dot gnu.org
@ 2024-01-23 20:28 ` jason at gcc dot gnu.org
2024-01-24 19:39 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2024-01-23 20:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (10 preceding siblings ...)
2024-01-23 20:28 ` jason at gcc dot gnu.org
@ 2024-01-24 19:39 ` cvs-commit at gcc dot gnu.org
2024-01-24 19:40 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-24 19:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:713fbaff8b17a01d3b72110f89112851ed43a90a
commit r13-8249-g713fbaff8b17a01d3b72110f89112851ed43a90a
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jan 23 15:41:09 2024 -0500
c++: throwing cleanup after return [PR113347]
Here we were assuming that current_retval_sentinel would be set if we have
seen a throwing cleanup, but that's not the case if the cleanup is after
all
returns.
This change isn't needed on trunk, where current_retval_sentinel is set for
all NRV functions.
PR c++/113347
gcc/cp/ChangeLog:
* semantics.cc (finalize_nrv_r): Handle null
current_retval_sentinel.
gcc/testsuite/ChangeLog:
* g++.dg/eh/return3.C: New test.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (11 preceding siblings ...)
2024-01-24 19:39 ` cvs-commit at gcc dot gnu.org
@ 2024-01-24 19:40 ` cvs-commit at gcc dot gnu.org
2024-01-24 19:42 ` cvs-commit at gcc dot gnu.org
2024-01-24 19:43 ` jason at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-24 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:050fc885a6e324a03a6397d86134ab4b68aac944
commit r12-10112-g050fc885a6e324a03a6397d86134ab4b68aac944
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jan 23 15:41:09 2024 -0500
c++: throwing cleanup after return [PR113347]
Here we were assuming that current_retval_sentinel would be set if we have
seen a throwing cleanup, but that's not the case if the cleanup is after
all
returns.
This change isn't needed on trunk, where current_retval_sentinel is set for
all NRV functions.
PR c++/113347
gcc/cp/ChangeLog:
* semantics.cc (finalize_nrv_r): Handle null
current_retval_sentinel.
gcc/testsuite/ChangeLog:
* g++.dg/eh/return3.C: New test.
(cherry picked from commit 713fbaff8b17a01d3b72110f89112851ed43a90a)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (12 preceding siblings ...)
2024-01-24 19:40 ` cvs-commit at gcc dot gnu.org
@ 2024-01-24 19:42 ` cvs-commit at gcc dot gnu.org
2024-01-24 19:43 ` jason at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-24 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:aedfdd340cbb4a97a8f6d432720a4df374c1e467
commit r14-8401-gaedfdd340cbb4a97a8f6d432720a4df374c1e467
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jan 23 16:09:15 2024 -0500
c++: add test [PR113347]
The patch for this PR is unneeded on trunk, but let's add the test.
PR c++/113347
gcc/testsuite/ChangeLog:
* g++.dg/eh/return3.C: New test.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52
2024-01-12 7:17 [Bug c++/113347] New: ICE during gimplification building TVM rguenth at gcc dot gnu.org
` (13 preceding siblings ...)
2024-01-24 19:42 ` cvs-commit at gcc dot gnu.org
@ 2024-01-24 19:43 ` jason at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2024-01-24 19:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 12.4/13.3.
^ permalink raw reply [flat|nested] 16+ messages in thread