public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
@ 2011-02-25 2:59 d.g.gorbachev at gmail dot com
2011-02-25 3:01 ` [Bug tree-optimization/47890] " d.g.gorbachev at gmail dot com
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-02-25 2:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
Summary: [4.5/4.6 Regression] internal compiler error: in
vect_get_vec_def_for_stmt_copy, at
tree-vect-stmts.c:1186
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: d.g.gorbachev@gmail.com
Created attachment 23462
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23462
Backtrace
$ cat > bug.c
void f(char *s)
{
signed short i;
for (i = 0; i < 19; i = i + 1)
s[i] = i;
}
^D
$ gcc -O3 -march=pentium4 bug.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
@ 2011-02-25 3:01 ` d.g.gorbachev at gmail dot com
2011-02-25 10:49 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-02-25 3:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
--- Comment #1 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-02-25 01:42:56 UTC ---
Created attachment 23463
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23463
Backtrace from GCC 4.5
4.5.3 also fails with `internal compiler error: in
get_initial_def_for_induction, at tree-vect-loop.c:2431' message. It looks like
bug 46723.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
2011-02-25 3:01 ` [Bug tree-optimization/47890] " d.g.gorbachev at gmail dot com
@ 2011-02-25 10:49 ` rguenth at gcc dot gnu.org
2011-02-25 17:24 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-25 10:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.02.25 10:42:33
Target Milestone|--- |4.5.3
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-25 10:42:33 UTC ---
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
2011-02-25 3:01 ` [Bug tree-optimization/47890] " d.g.gorbachev at gmail dot com
2011-02-25 10:49 ` rguenth at gcc dot gnu.org
@ 2011-02-25 17:24 ` rguenth at gcc dot gnu.org
2011-02-26 14:00 ` irar at il dot ibm.com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-25 17:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-25 16:43:11 UTC ---
Ira,
Index: gcc/tree-vect-loop.c
===================================================================
*** gcc/tree-vect-loop.c (revision 170492)
--- gcc/tree-vect-loop.c (working copy)
*************** get_initial_def_for_induction (gimple iv
*** 2886,2891 ****
--- 2886,2894 ----
gimple_assign_set_lhs (new_stmt, induc_def);
si = gsi_start_bb (bb);
gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
+ set_vinfo_for_stmt (new_stmt,
+ new_stmt_vec_info (new_stmt, loop_vinfo, NULL));
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (new_stmt)) = induction_phi;
}
return induc_def;
fixes this for me, but I'm not familiar with how this related stmt stuff
works, so can you please double-check?
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
` (2 preceding siblings ...)
2011-02-25 17:24 ` rguenth at gcc dot gnu.org
@ 2011-02-26 14:00 ` irar at il dot ibm.com
2011-02-26 15:22 ` irar at il dot ibm.com
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: irar at il dot ibm.com @ 2011-02-26 14:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
Ira Rosen <irar at il dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at il dot ibm.com
--- Comment #4 from Ira Rosen <irar at il dot ibm.com> 2011-02-26 12:58:59 UTC ---
RELATED_STMT of a stmt is supposed to be a copy of that stmt (the same stmt in
next loop iteration) in case of multiple types, so the fix doesn't seem right.
I'll try to look into the bug.
Ira
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
` (3 preceding siblings ...)
2011-02-26 14:00 ` irar at il dot ibm.com
@ 2011-02-26 15:22 ` irar at il dot ibm.com
2011-03-01 10:36 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: irar at il dot ibm.com @ 2011-02-26 15:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
--- Comment #5 from Ira Rosen <irar at il dot ibm.com> 2011-02-26 14:45:30 UTC ---
Similar to your patch, Richard, but with different related stmt:
@@ -2886,6 +3024,10 @@ get_initial_def_for_induction (gimple iv
gimple_assign_set_lhs (new_stmt, induc_def);
si = gsi_start_bb (bb);
gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
+ set_vinfo_for_stmt (new_stmt,
+ new_stmt_vec_info (new_stmt, loop_vinfo, NULL));
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (new_stmt))
+ = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (induction_phi));
}
The problem is that we first create copies and store them in RELATED_STMT
starting from INDUCTION_PHI, and then handle the cast. So, this patch copies
RELATED_STMT from INDUCTION_PHI to the VIEW_CONVERT stmt.
Ira
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
` (4 preceding siblings ...)
2011-02-26 15:22 ` irar at il dot ibm.com
@ 2011-03-01 10:36 ` rguenth at gcc dot gnu.org
2011-03-01 13:18 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 10:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 10:36:33 UTC ---
I'm testing this variant.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
` (5 preceding siblings ...)
2011-03-01 10:36 ` rguenth at gcc dot gnu.org
@ 2011-03-01 13:18 ` rguenth at gcc dot gnu.org
2011-03-01 13:19 ` [Bug tree-optimization/47890] [4.5 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 13:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 13:18:29 UTC ---
Author: rguenth
Date: Tue Mar 1 13:18:25 2011
New Revision: 170593
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170593
Log:
2011-03-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47890
* tree-vect-loop.c (get_initial_def_for_induction): Set
related stmt properly.
* gcc.dg/torture/pr47890.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr47890.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
` (6 preceding siblings ...)
2011-03-01 13:18 ` rguenth at gcc dot gnu.org
@ 2011-03-01 13:19 ` rguenth at gcc dot gnu.org
2011-03-01 17:04 ` rguenth at gcc dot gnu.org
2011-03-01 17:05 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.6.0
Summary|[4.5/4.6 Regression] |[4.5 Regression] internal
|internal compiler error: in |compiler error: in
|vect_get_vec_def_for_stmt_c |vect_get_vec_def_for_stmt_c
|opy, at |opy, at
|tree-vect-stmts.c:1186 |tree-vect-stmts.c:1186
Known to fail|4.6.0 |
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 13:18:53 UTC ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
` (7 preceding siblings ...)
2011-03-01 13:19 ` [Bug tree-optimization/47890] [4.5 " rguenth at gcc dot gnu.org
@ 2011-03-01 17:04 ` rguenth at gcc dot gnu.org
2011-03-01 17:05 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 17:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 17:04:32 UTC ---
Author: rguenth
Date: Tue Mar 1 17:04:26 2011
New Revision: 170595
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170595
Log:
2011-03-01 Richard Guenther <rguenther@suse.de>
Backport from mainline
2011-03-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47890
* tree-vect-loop.c (get_initial_def_for_induction): Set
related stmt properly.
* gcc.dg/torture/pr47890.c: New testcase.
2010-12-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46723
* tree-vect-loop.c (get_initial_def_for_induction): Strip
conversions from the induction evolution and apply it to
the result instead.
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Handle
assigns for induction defs.
* gcc.dg/torture/pr46723.c: New testcase.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/torture/pr46723.c
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/torture/pr47890.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/tree-vect-loop.c
branches/gcc-4_5-branch/gcc/tree-vect-stmts.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/47890] [4.5 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
` (8 preceding siblings ...)
2011-03-01 17:04 ` rguenth at gcc dot gnu.org
@ 2011-03-01 17:05 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 17:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 17:04:43 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-03-01 17:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-25 2:59 [Bug tree-optimization/47890] New: [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186 d.g.gorbachev at gmail dot com
2011-02-25 3:01 ` [Bug tree-optimization/47890] " d.g.gorbachev at gmail dot com
2011-02-25 10:49 ` rguenth at gcc dot gnu.org
2011-02-25 17:24 ` rguenth at gcc dot gnu.org
2011-02-26 14:00 ` irar at il dot ibm.com
2011-02-26 15:22 ` irar at il dot ibm.com
2011-03-01 10:36 ` rguenth at gcc dot gnu.org
2011-03-01 13:18 ` rguenth at gcc dot gnu.org
2011-03-01 13:19 ` [Bug tree-optimization/47890] [4.5 " rguenth at gcc dot gnu.org
2011-03-01 17:04 ` rguenth at gcc dot gnu.org
2011-03-01 17:05 ` rguenth 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).