* [Bug middle-end/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
@ 2023-06-15 18:11 ` slyfox at gcc dot gnu.org
2023-06-15 19:17 ` [Bug tree-optimization/110271] " pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-06-15 18:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
--- Comment #1 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Created attachment 55330
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55330&action=edit
mont.c.c.orig.xz
In case I reduced it too much mont.c.c.orig.xz is the original preprocessed
file. ICEs with identical compiler options.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
2023-06-15 18:11 ` [Bug middle-end/110271] " slyfox at gcc dot gnu.org
@ 2023-06-15 19:17 ` pinskia at gcc dot gnu.org
2023-06-15 19:19 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-15 19:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
Component|middle-end |tree-optimization
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
2023-06-15 18:11 ` [Bug middle-end/110271] " slyfox at gcc dot gnu.org
2023-06-15 19:17 ` [Bug tree-optimization/110271] " pinskia at gcc dot gnu.org
@ 2023-06-15 19:19 ` pinskia at gcc dot gnu.org
2023-06-15 19:34 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-15 19:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
99% sure it was introduced with r14-1837-g43a3252c42af12 .
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
` (2 preceding siblings ...)
2023-06-15 19:19 ` pinskia at gcc dot gnu.org
@ 2023-06-15 19:34 ` pinskia at gcc dot gnu.org
2023-06-15 20:52 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-15 19:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-06-15
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
` (3 preceding siblings ...)
2023-06-15 19:34 ` pinskia at gcc dot gnu.org
@ 2023-06-15 20:52 ` jakub at gcc dot gnu.org
2023-06-16 17:48 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-06-15 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem is that I thought match_arith_overflow returns true if it replaced
something, but that is not the case, it only returns true for the BIT_NOT_EXPR
case when it removed the stmt.
So, I think the right test for whether match_arith_overflow actually replaced
something is whether gsi_stmt (gsi) == stmt.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
` (4 preceding siblings ...)
2023-06-15 20:52 ` jakub at gcc dot gnu.org
@ 2023-06-16 17:48 ` cvs-commit at gcc dot gnu.org
2023-06-16 18:02 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-16 17:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:5b67116a85298bbe358b036d34ad23119cebbdac
commit r14-1895-g5b67116a85298bbe358b036d34ad23119cebbdac
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Jun 16 19:46:36 2023 +0200
tree-ssa-math-opts: Fix up uaddc/usubc pattern matching [PR110271]
The following testcase ICEs, because I misremembered what the return value
from match_arith_overflow is. It isn't true if __builtin_*_overflow was
matched, but it is true only in the BIT_NOT_EXPR case if stmt was removed.
So, if match_arith_overflow matches something, gsi_stmt (gsi) will not
be stmt and match_uaddc_usubc will be confused and can ICE.
The following patch fixes it by checking if gsi_stmt (gsi) == stmt,
in that case we know it is still a PLUS_EXPR/MINUS_EXPR and we can try to
pattern match it further as UADDC/USUBC.
2023-06-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/110271
* tree-ssa-math-opts.cc (math_opts_dom_walker::after_dom_children)
<case PLUS_EXPR>: Ignore return value from match_arith_overflow,
instead call match_uaddc_usubc only if gsi_stmt (gsi) is still
stmt.
* gcc.c-torture/compile/pr110271.c: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
` (5 preceding siblings ...)
2023-06-16 17:48 ` cvs-commit at gcc dot gnu.org
@ 2023-06-16 18:02 ` jakub at gcc dot gnu.org
2023-06-16 20:43 ` slyfox at gcc dot gnu.org
2023-06-17 8:34 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-06-16 18:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
` (6 preceding siblings ...)
2023-06-16 18:02 ` jakub at gcc dot gnu.org
@ 2023-06-16 20:43 ` slyfox at gcc dot gnu.org
2023-06-17 8:34 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-06-16 20:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
--- Comment #7 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
I confirm the fix also fixes pycryptodome-3.17.0 package build. Thank you!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110271] [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437
2023-06-15 18:09 [Bug middle-end/110271] New: [14 Regression] UICE on pycryptodome-3.17.0 during GIMPLE pass: widening_mul: in gsi_replace, at gimple-iterator.cc:437 slyfox at gcc dot gnu.org
` (7 preceding siblings ...)
2023-06-16 20:43 ` slyfox at gcc dot gnu.org
@ 2023-06-17 8:34 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-17 8:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110271
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manuel.lauss at googlemail dot com
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110296 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread