* [Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
@ 2023-07-21 20:39 ` pinskia at gcc dot gnu.org
2023-07-21 20:40 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-21 20:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on valid code at -O3 on |[14 Regression] ICE on
|x86_64-linux-gnu: in |valid code at -O3 on
|gimple_phi_arg_def_from_edg |x86_64-linux-gnu: in
|e, at gimple.h:4699 |gimple_phi_arg_def_from_edg
| |e, at gimple.h:4699
Target Milestone|--- |14.0
Keywords| |ice-on-valid-code
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=110669
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
2023-07-21 20:39 ` [Bug tree-optimization/110766] [14 Regression] " pinskia at gcc dot gnu.org
@ 2023-07-21 20:40 ` pinskia at gcc dot gnu.org
2023-07-22 14:20 ` dcb314 at hotmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-21 20:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-07-21
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Note I also double checked the others which I had marked as a dup of bug
110669 to make sure they were fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
2023-07-21 20:39 ` [Bug tree-optimization/110766] [14 Regression] " pinskia at gcc dot gnu.org
2023-07-21 20:40 ` pinskia at gcc dot gnu.org
@ 2023-07-22 14:20 ` dcb314 at hotmail dot com
2023-07-22 16:36 ` dcb314 at hotmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2023-07-22 14:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
I see this also, except with -O2. The bug first seems
to occur sometime between g:43fefc1f832a8037 and g:b5138df96a93d3b5,
a range of 31 commits.
I have a reduction running.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
` (2 preceding siblings ...)
2023-07-22 14:20 ` dcb314 at hotmail dot com
@ 2023-07-22 16:36 ` dcb314 at hotmail dot com
2023-07-24 6:31 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2023-07-22 16:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
Reduced C++ code seems to be:
template <int _Nw> struct _Base_bitset {
unsigned long _M_w[_Nw];
unsigned long &_M_getword() { return _M_w[0]; }
};
struct bitset : _Base_bitset<0> {
int _Unchecked_set___val;
void set() {
long __trans_tmp_4;
if (_Unchecked_set___val)
_M_getword() |= __trans_tmp_4;
}
void reset() {
long __trans_tmp_5, __trans_tmp_3;
__trans_tmp_5 = 1 << __trans_tmp_3;
_M_getword() &= __trans_tmp_5;
}
};
using PlayBehaviourSet = bitset;
struct CSoundFile {
PlayBehaviourSet m_playBehaviour;
void UpgradeModule();
};
void CSoundFile::UpgradeModule() {
for (int i = 0; i < 5; i++) {
m_playBehaviour.set();
m_playBehaviour.reset();
}
}
cvise $ ~/gcc/results/bin/gcc -c -O2 bug943.cc
during GIMPLE pass: sccp
bug943.cc: In member function ‘void CSoundFile::UpgradeModule()’:
bug943.cc:23:6: internal compiler error: in gimple_phi_arg_def_from_edge, at
gimple.h:4699
23 | void CSoundFile::UpgradeModule() {
| ^~~~~~~~~~
0x123f7dc final_value_replacement_loop(loop*)
../../trunk.year/gcc/tree-scalar-evolution.cc:0
0x12fdfb7 (anonymous namespace)::pass_scev_cprop::execute(function*)
../../trunk.year/gcc/tree-ssa-loop.cc:411
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
cvise $
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
` (3 preceding siblings ...)
2023-07-22 16:36 ` dcb314 at hotmail dot com
@ 2023-07-24 6:31 ` rguenth at gcc dot gnu.org
2023-07-24 7:50 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-24 6:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Version|unknown |14.0
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
` (4 preceding siblings ...)
2023-07-24 6:31 ` rguenth at gcc dot gnu.org
@ 2023-07-24 7:50 ` cvs-commit at gcc dot gnu.org
2023-07-24 7:51 ` [Bug tree-optimization/110766] [13 " rguenth 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-07-24 7:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
--- Comment #5 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:fb132cdfb204bc12851eb1d5852eef6f03c13af3
commit r14-2737-gfb132cdfb204bc12851eb1d5852eef6f03c13af3
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 24 08:40:19 2023 +0200
tree-optimization/110766 - missing PHI location check
The following adds a missing PHI location check before querying
the loop latch PHI arg from it.
PR tree-optimization/110766
* tree-scalar-evolution.cc
(analyze_and_compute_bitwise_induction_effect): Check the PHI
is defined in the loop header.
* gcc.dg/torture/pr110766.c: New testcase.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [13 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
` (5 preceding siblings ...)
2023-07-24 7:50 ` cvs-commit at gcc dot gnu.org
@ 2023-07-24 7:51 ` rguenth at gcc dot gnu.org
2023-07-27 10:34 ` cvs-commit at gcc dot gnu.org
2023-07-27 10:38 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-24 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[14 Regression] ICE on |[13 Regression] ICE on
|valid code at -O3 on |valid code at -O3 on
|x86_64-linux-gnu: in |x86_64-linux-gnu: in
|gimple_phi_arg_def_from_edg |gimple_phi_arg_def_from_edg
|e, at gimple.h:4699 |e, at gimple.h:4699
Priority|P3 |P2
Target Milestone|14.0 |13.3
Known to work| |14.0
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk, latent on the branch - will push there once it re-opens.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [13 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
` (6 preceding siblings ...)
2023-07-24 7:51 ` [Bug tree-optimization/110766] [13 " rguenth at gcc dot gnu.org
@ 2023-07-27 10:34 ` cvs-commit at gcc dot gnu.org
2023-07-27 10:38 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-27 10:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:7004272e9b16e801eb856a991930d81e9c501532
commit r13-7611-g7004272e9b16e801eb856a991930d81e9c501532
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 24 08:40:19 2023 +0200
tree-optimization/110766 - missing PHI location check
The following adds a missing PHI location check before querying
the loop latch PHI arg from it.
PR tree-optimization/110766
* tree-scalar-evolution.cc
(analyze_and_compute_bitwise_induction_effect): Check the PHI
is defined in the loop header.
* gcc.dg/torture/pr110766.c: New testcase.
(cherry picked from commit fb132cdfb204bc12851eb1d5852eef6f03c13af3)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/110766] [13 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699
2023-07-21 12:27 [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 zhendong.su at inf dot ethz.ch
` (7 preceding siblings ...)
2023-07-27 10:34 ` cvs-commit at gcc dot gnu.org
@ 2023-07-27 10:38 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-27 10:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread