public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
@ 2021-10-14 17:11 law at gcc dot gnu.org
2021-10-14 17:14 ` [Bug tree-optimization/102752] " law at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: law at gcc dot gnu.org @ 2021-10-14 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
Bug ID: 102752
Summary: [12 Regression] Recent change to ldist causing ICE on
msp430-elf, rl78-elf, and xstormy16-elf
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: law at gcc dot gnu.org
Target Milestone: ---
After this change:
msp430-elf, rl78-elf and xstormy16-elf are all getting an ICE on
gcc.c-torture/execute/
>From the msp430-elf gcc.log file:
/home/jlaw/jenkins/workspace/msp430-elf/gcc/gcc/testsuite/gcc.c-torture/execute/20100827-1.c:
In function 'foo':^M
/home/jlaw/jenkins/workspace/msp430-elf/gcc/gcc/testsuite/gcc.c-torture/execute/20100827-1.c:3:1:
internal compiler error: tree check: expected class 'type', have 'exceptional'
(ssa_name) in transform_reduction_loop, at tree-loop-distribution.c:3684^M
0x1532ceb tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)^M
../../..//gcc/gcc/tree.c:8739^M
0x861c29 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)^M
../../..//gcc/gcc/tree.h:3556^M
0x12006d9 loop_distribution::transform_reduction_loop(loop*)^M
../../..//gcc/gcc/tree-loop-distribution.c:3684^M
0x1200d92 loop_distribution::execute(function*)^M
../../..//gcc/gcc/tree-loop-distribution.c:3776^M
0x12012bd execute^M
../../..//gcc/gcc/tree-loop-distribution.c:3901^M
Please submit a full bug report,^M
You should be able to reproduce this with just a cross compiler. No assembler
or target libraries should be needed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
@ 2021-10-14 17:14 ` law at gcc dot gnu.org
2021-10-14 18:07 ` stefansf at linux dot ibm.com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: law at gcc dot gnu.org @ 2021-10-14 17:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
gcc.dg/tree-ssa/pr45427.c shows the same issue.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
2021-10-14 17:14 ` [Bug tree-optimization/102752] " law at gcc dot gnu.org
@ 2021-10-14 18:07 ` stefansf at linux dot ibm.com
2021-10-14 18:11 ` law at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: stefansf at linux dot ibm.com @ 2021-10-14 18:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
--- Comment #2 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> ---
It looks like I missed to take the TREE_TYPE of reduction_var. I just did a
quick test with
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index fb9250031b5..0559b9c47d7 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -3430,7 +3430,7 @@ generate_strlen_builtin_using_rawmemchr (loop_p loop,
tree reduction_var,
static bool
reduction_var_overflows_first (tree reduction_var, tree load_type)
{
- widest_int n2 = wi::lshift (1, TYPE_PRECISION (reduction_var));;
+ widest_int n2 = wi::lshift (1, TYPE_PRECISION (TREE_TYPE (reduction_var)));;
widest_int m2 = wi::lshift (1, TYPE_PRECISION (ptrdiff_type_node) - 1);
widest_int s = wi::to_widest (TYPE_SIZE_UNIT (load_type));
return wi::ltu_p (n2, wi::udiv_trunc (m2, s));
@@ -3681,7 +3681,7 @@ loop_distribution::transform_reduction_loop (loop_p loop)
&& ((TYPE_PRECISION (sizetype) >= TYPE_PRECISION (ptr_type_node) - 1
&& TYPE_PRECISION (ptr_type_node) >= 32)
|| (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (reduction_var))
- && TYPE_PRECISION (reduction_var) <= TYPE_PRECISION
(sizetype)))
+ && TYPE_PRECISION (TREE_TYPE (reduction_var)) <=
TYPE_PRECISION (sizetype)))
&& builtin_decl_implicit (BUILT_IN_STRLEN))
generate_strlen_builtin (loop, reduction_var, load_iv.base,
reduction_iv.base, loc);
successfully. It's getting late here. I will come back to this tomorrow
morning. Sorry for the inconvenience.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
2021-10-14 17:14 ` [Bug tree-optimization/102752] " law at gcc dot gnu.org
2021-10-14 18:07 ` stefansf at linux dot ibm.com
@ 2021-10-14 18:11 ` law at gcc dot gnu.org
2021-10-14 23:41 ` law at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: law at gcc dot gnu.org @ 2021-10-14 18:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
No worries. This is why we have testing systems.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
` (2 preceding siblings ...)
2021-10-14 18:11 ` law at gcc dot gnu.org
@ 2021-10-14 23:41 ` law at gcc dot gnu.org
2021-10-15 6:18 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: law at gcc dot gnu.org @ 2021-10-14 23:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-10-14
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> ---
And just an FYI. That patch fixes the problem on all three affected platforms.
Assuming it bootstraps and regression tests, consider it pre-approved for the
trunk.
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
` (3 preceding siblings ...)
2021-10-14 23:41 ` law at gcc dot gnu.org
@ 2021-10-15 6:18 ` rguenth at gcc dot gnu.org
2021-10-15 9:41 ` stefansf at linux dot ibm.com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-15 6:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Target Milestone|--- |12.0
Keywords| |ice-on-valid-code
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
` (4 preceding siblings ...)
2021-10-15 6:18 ` rguenth at gcc dot gnu.org
@ 2021-10-15 9:41 ` stefansf at linux dot ibm.com
2021-10-15 9:43 ` stefansf at linux dot ibm.com
2021-10-15 14:41 ` law at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: stefansf at linux dot ibm.com @ 2021-10-15 9:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
--- Comment #5 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> ---
Created attachment 51606
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51606&action=edit
Fix determining precission of reduction_var
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
` (5 preceding siblings ...)
2021-10-15 9:41 ` stefansf at linux dot ibm.com
@ 2021-10-15 9:43 ` stefansf at linux dot ibm.com
2021-10-15 14:41 ` law at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: stefansf at linux dot ibm.com @ 2021-10-15 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
--- Comment #6 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> ---
Thanks for confirmation! Bootstrap and regtest are still running on x86 as well
as IBM Z. I will commit the attached patch assuming successful runs.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/102752] [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
` (6 preceding siblings ...)
2021-10-15 9:43 ` stefansf at linux dot ibm.com
@ 2021-10-15 14:41 ` law at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: law at gcc dot gnu.org @ 2021-10-15 14:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102752
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Fixed on the trunk.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-10-15 14:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 17:11 [Bug tree-optimization/102752] New: [12 Regression] Recent change to ldist causing ICE on msp430-elf, rl78-elf, and xstormy16-elf law at gcc dot gnu.org
2021-10-14 17:14 ` [Bug tree-optimization/102752] " law at gcc dot gnu.org
2021-10-14 18:07 ` stefansf at linux dot ibm.com
2021-10-14 18:11 ` law at gcc dot gnu.org
2021-10-14 23:41 ` law at gcc dot gnu.org
2021-10-15 6:18 ` rguenth at gcc dot gnu.org
2021-10-15 9:41 ` stefansf at linux dot ibm.com
2021-10-15 9:43 ` stefansf at linux dot ibm.com
2021-10-15 14:41 ` law at gcc dot gnu.org
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).