* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
@ 2021-07-18 7:58 ` pinskia at gcc dot gnu.org
2021-07-18 7:58 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-18 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Component|c |tree-optimization
Keywords| |ice-on-valid-code
Summary|ice in type, at |[12 Regression] ice in
|value-range.h:221 |type, at value-range.h:221
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
2021-07-18 7:58 ` [Bug tree-optimization/101497] [12 Regression] " pinskia at gcc dot gnu.org
@ 2021-07-18 7:58 ` pinskia at gcc dot gnu.org
2021-07-18 16:38 ` dcb314 at hotmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-18 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to David Binderman from comment #0)
> Bug first seems to occur sometime between git hash 7466a0a5d8d536ab
> and 94ba897be8b59ef5
So between r12-2235 and r12-2372.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
2021-07-18 7:58 ` [Bug tree-optimization/101497] [12 Regression] " pinskia at gcc dot gnu.org
2021-07-18 7:58 ` pinskia at gcc dot gnu.org
@ 2021-07-18 16:38 ` dcb314 at hotmail dot com
2021-07-18 16:56 ` dcb314 at hotmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2021-07-18 16:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> (In reply to David Binderman from comment #0)
> > Bug first seems to occur sometime between git hash 7466a0a5d8d536ab
> > and 94ba897be8b59ef5
>
> So between r12-2235 and r12-2372.
About 68 revisions, so trying revision 269ca408e2839d7f.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
` (2 preceding siblings ...)
2021-07-18 16:38 ` dcb314 at hotmail dot com
@ 2021-07-18 16:56 ` dcb314 at hotmail dot com
2021-07-18 17:58 ` dcb314 at hotmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2021-07-18 16:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to David Binderman from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > (In reply to David Binderman from comment #0)
> > > Bug first seems to occur sometime between git hash 7466a0a5d8d536ab
> > > and 94ba897be8b59ef5
> >
> > So between r12-2235 and r12-2372.
>
> About 68 revisions, so trying revision 269ca408e2839d7f.
Seems good, so trying 33255ad3ac14e395.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
` (3 preceding siblings ...)
2021-07-18 16:56 ` dcb314 at hotmail dot com
@ 2021-07-18 17:58 ` dcb314 at hotmail dot com
2021-07-19 6:36 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2021-07-18 17:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amacleod at redhat dot com
--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
Range seems to be [33255ad3ac14e395, c031ea2782a1873e],
so this looks like another one for Andrew Macleod.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
` (4 preceding siblings ...)
2021-07-18 17:58 ` dcb314 at hotmail dot com
@ 2021-07-19 6:36 ` rguenth at gcc dot gnu.org
2021-07-19 19:11 ` amacleod at redhat dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-19 6:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
` (5 preceding siblings ...)
2021-07-19 6:36 ` rguenth at gcc dot gnu.org
@ 2021-07-19 19:11 ` amacleod at redhat dot com
2021-07-22 12:53 ` cvs-commit at gcc dot gnu.org
2021-07-22 13:07 ` amacleod at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2021-07-19 19:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
--- Comment #5 from Andrew Macleod <amacleod at redhat dot com> ---
uc_1.0_1 = uc_1;
_2 = (int) uc_1.0_1;
_3 = 211 - _2;
_3 evaluates as 211 - [-128, 127], or [84, 339]
_4 = _3 > 0;
_5 = (int) _4;
func_12_uli_6 = _5;
i_4.1_6 = i_4;
_7 = i_4.1_6 % 0;
We changed it so that anything mod 0 was undefined. so _7 is UNDEFINED.
i_4 = _7;
_11 = _3 > 0;
_3 i s[84, 339] meaning _11 always evaluates TRUE.
_10 = _11 ? _7 : 0;
The code for COND_EXPR confirms the types match when it folds. In this case,
the result is UNDEFINED.. undefined has no type, so we need to add a check for
that.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
` (6 preceding siblings ...)
2021-07-19 19:11 ` amacleod at redhat dot com
@ 2021-07-22 12:53 ` cvs-commit at gcc dot gnu.org
2021-07-22 13:07 ` amacleod at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-22 12:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <amacleod@gcc.gnu.org>:
https://gcc.gnu.org/g:ea789238b2c24eedf70b56257235adf3d33c5a0a
commit r12-2465-gea789238b2c24eedf70b56257235adf3d33c5a0a
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Mon Jul 19 15:16:25 2021 -0400
Check for undefined on COND_EXPR before querying type.
gcc/
PR tree-optimization/101497
* gimple-range-fold.cc (fold_using_range::range_of_cond_expr):
Check
for undefined.
gcc/testsuite
* gcc.dg/pr101497.c: New.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/101497] [12 Regression] ice in type, at value-range.h:221
2021-07-18 7:53 [Bug c/101497] New: ice in type, at value-range.h:221 dcb314 at hotmail dot com
` (7 preceding siblings ...)
2021-07-22 12:53 ` cvs-commit at gcc dot gnu.org
@ 2021-07-22 13:07 ` amacleod at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2021-07-22 13:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101497
Andrew Macleod <amacleod at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #7 from Andrew Macleod <amacleod at redhat dot com> ---
fixed
^ permalink raw reply [flat|nested] 10+ messages in thread