public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97381] New: ice error: invalid types in nop conversion
@ 2020-10-12 10:24 dcb314 at hotmail dot com
2020-10-12 10:31 ` [Bug c/97381] " dcb314 at hotmail dot com
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2020-10-12 10:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
Bug ID: 97381
Summary: ice error: invalid types in nop conversion
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Created attachment 49352
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49352&action=edit
C source code
The attached C code seems to ice on flag -O2.
$ ../results/bin/gcc -c -w -O2 bug654.c
destDir/testFile.289.c: In function ‘func_10’:
destDir/testFile.289.c:11479:1: error: invalid types in nop conversion
unsigned char
<<< error >>>
c_7.5374_1690 = (unsigned char) _11366;
destDir/testFile.289.c:11479:1: error: invalid types in nop conversion
unsigned char
<<< error >>>
c_7.5389_1728 = (unsigned char) _11366;
during GIMPLE pass: evrp
destDir/testFile.289.c:11479:1: internal compiler error: verify_gimple failed
0xcf360f verify_gimple_in_cfg(function*, bool)
../../trunk.git/gcc/tree-cfg.c:5482
I'll have my usual go at reducing the code and finding a range
for the error.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/97381] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
@ 2020-10-12 10:31 ` dcb314 at hotmail dot com
2020-10-12 10:41 ` dcb314 at hotmail dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2020-10-12 10:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
The problem first seems to occur sometime between 20201006 and 20201007.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/97381] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
2020-10-12 10:31 ` [Bug c/97381] " dcb314 at hotmail dot com
@ 2020-10-12 10:41 ` dcb314 at hotmail dot com
2020-10-12 11:09 ` [Bug tree-optimization/97381] [11 Regression] " rguenth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2020-10-12 10:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
Reduced C code is:
int a;
void b() {
char c = 27;
for (; c <= 85; c += 1) {
a /= 148372120 * c;
if (a)
for (;;)
;
}
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
2020-10-12 10:31 ` [Bug c/97381] " dcb314 at hotmail dot com
2020-10-12 10:41 ` dcb314 at hotmail dot com
@ 2020-10-12 11:09 ` rguenth at gcc dot gnu.org
2020-10-12 11:42 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-12 11:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-10-12
CC| |aldyh at gcc dot gnu.org
Target Milestone|--- |11.0
Summary|ice error: invalid types in |[11 Regression] ice error:
|nop conversion |invalid types in nop
| |conversion
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Component|c |tree-optimization
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
EVRP
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
` (2 preceding siblings ...)
2020-10-12 11:09 ` [Bug tree-optimization/97381] [11 Regression] " rguenth at gcc dot gnu.org
@ 2020-10-12 11:42 ` rguenth at gcc dot gnu.org
2020-10-12 11:49 ` aldyh at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-12 11:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
` (3 preceding siblings ...)
2020-10-12 11:42 ` rguenth at gcc dot gnu.org
@ 2020-10-12 11:49 ` aldyh at gcc dot gnu.org
2020-10-12 16:57 ` aldyh at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu.org @ 2020-10-12 11:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to David Binderman from comment #2)
> Reduced C code is:
>
> int a;
> void b() {
> char c = 27;
> for (; c <= 85; c += 1) {
> a /= 148372120 * c;
> if (a)
> for (;;)
> ;
> }
> }
This looks similar to PR97378.
There is no definition of _8 but there is still a dangling use left:
c.2_6 = (unsigned char) _8;
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
` (4 preceding siblings ...)
2020-10-12 11:49 ` aldyh at gcc dot gnu.org
@ 2020-10-12 16:57 ` aldyh at gcc dot gnu.org
2020-10-12 17:03 ` aldyh at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu.org @ 2020-10-12 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
Bug 97381 depends on bug 97378, which changed state.
Bug 97378 Summary: [11 Regression] ICE in tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 since r11-3685-gfcae5121154d1c33
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97378
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
` (5 preceding siblings ...)
2020-10-12 16:57 ` aldyh at gcc dot gnu.org
@ 2020-10-12 17:03 ` aldyh at gcc dot gnu.org
2020-10-12 18:06 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu.org @ 2020-10-12 17:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 49354
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49354&action=edit
propsed patch in testing
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
` (6 preceding siblings ...)
2020-10-12 17:03 ` aldyh at gcc dot gnu.org
@ 2020-10-12 18:06 ` cvs-commit at gcc dot gnu.org
2020-10-12 18:06 ` aldyh at gcc dot gnu.org
2020-10-14 15:47 ` amacleod at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-12 18:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>:
https://gcc.gnu.org/g:46f4a397ab0907ce5786e1f0b92030a73e8b89ef
commit r11-3836-g46f4a397ab0907ce5786e1f0b92030a73e8b89ef
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Mon Oct 12 13:00:12 2020 -0400
Do not ignore failures from gimple_range_calc_op2.
We were ignoring the return value if op2 returned false and getting garbage
ranges propagated.
gcc/ChangeLog:
PR tree-optimization/97381
* gimple-range-gori.cc (gori_compute::compute_operand2_range): If a
range cannot be
calculated through operand 2, return false.
gcc/testsuite/ChangeLog:
* gcc.dg/pr97381.c: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
` (7 preceding siblings ...)
2020-10-12 18:06 ` cvs-commit at gcc dot gnu.org
@ 2020-10-12 18:06 ` aldyh at gcc dot gnu.org
2020-10-14 15:47 ` amacleod at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu.org @ 2020-10-12 18:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
fixed
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/97381] [11 Regression] ice error: invalid types in nop conversion
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
` (8 preceding siblings ...)
2020-10-12 18:06 ` aldyh at gcc dot gnu.org
@ 2020-10-14 15:47 ` amacleod at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: amacleod at redhat dot com @ 2020-10-14 15:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97381
--- Comment #8 from Andrew Macleod <amacleod at redhat dot com> ---
in particular:
_2 = (int) c_8;
_3 = _2 * 148372120;
_4 = a.0_1 / _3;
if (_4 != 0)
we do not wind back thru divides at the moment (unless they are exact divides)
so when processing the false edge to calculate a range for c_8 (which feeds
into a phi eventually)
so when processing
[0, 0] = a.0_1 / _3
and trying to calculate a range for _3 , range-ops was returning false,
indicating no further processing should be done (so we wont know anything else
about c_8)
By ignoring that, and continuing to process
_3 = _2 * 148372120;
with a LHS that was garbage, we were getting some less than ideal results as we
continued back to the cast and figured a value for c_8.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-10-14 15:47 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 10:24 [Bug c/97381] New: ice error: invalid types in nop conversion dcb314 at hotmail dot com
2020-10-12 10:31 ` [Bug c/97381] " dcb314 at hotmail dot com
2020-10-12 10:41 ` dcb314 at hotmail dot com
2020-10-12 11:09 ` [Bug tree-optimization/97381] [11 Regression] " rguenth at gcc dot gnu.org
2020-10-12 11:42 ` rguenth at gcc dot gnu.org
2020-10-12 11:49 ` aldyh at gcc dot gnu.org
2020-10-12 16:57 ` aldyh at gcc dot gnu.org
2020-10-12 17:03 ` aldyh at gcc dot gnu.org
2020-10-12 18:06 ` cvs-commit at gcc dot gnu.org
2020-10-12 18:06 ` aldyh at gcc dot gnu.org
2020-10-14 15:47 ` amacleod at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).