public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02
@ 2011-08-24 17:22 toon at moene dot org
2011-08-24 17:23 ` [Bug middle-end/50178] " toon at moene dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: toon at moene dot org @ 2011-08-24 17:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
Bug #: 50178
Summary: [4.6 regression] ICE with gfortran -O3, not with
gfortran -02
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: toon@moene.org
Created attachment 25089
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25089
Source code of the failing compilation.
Compiling the attached source code with gfortran 4.6.1 using optimization -O3
leads to the following Internal Compiler Error:
$ gfortran -O3 -c suedyn.f90
suedyn.f90: In function ‘suedyn’:
suedyn.f90:10:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
Compiling with -O2 instead succeeds (hence my suspicion that it is a middle-end
failure).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
@ 2011-08-24 17:23 ` toon at moene dot org
2011-08-24 18:00 ` burnus at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: toon at moene dot org @ 2011-08-24 17:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
Toon Moene <toon at moene dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-08-24
Ever Confirmed|0 |1
--- Comment #1 from Toon Moene <toon at moene dot org> 2011-08-24 17:21:23 UTC ---
The source code as attached is much reduced from the original, courtesy of
Steve Kargl.
Dominique Dhumieres wrote:
"It started to fail between revisions 158105 and 158252 and it has been
fixed on 4.7 between revisions 174599 and 175148."
in this note:
http://gcc.gnu.org/ml/fortran/2011-08/msg00198.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
2011-08-24 17:23 ` [Bug middle-end/50178] " toon at moene dot org
@ 2011-08-24 18:00 ` burnus at gcc dot gnu.org
2011-08-24 18:53 ` dominiq at lps dot ens.fr
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-24 18:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-24 17:42:00 UTC ---
>From http://gcc.gnu.org/ml/fortran/2011-08/msg00197.html
4.6.2-20110818 (Rev. 177878) crashes at:
==27008== Invalid read of size 8
==27008== at 0x89A58F: vect_is_simple_use_1 (tree-vect-stmts.c:5346)
==27008== by 0x89B4E5: vectorizable_operation (tree-vect-stmts.c:2440)
==27008== by 0x89F452: vect_transform_stmt (tree-vect-stmts.c:4841)
==27008== by 0x8ACB23: vect_transform_loop (tree-vect-loop.c:4872)
==27008== by 0x8B66E9: vectorize_loops (tree-vectorizer.c:205)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
2011-08-24 17:23 ` [Bug middle-end/50178] " toon at moene dot org
2011-08-24 18:00 ` burnus at gcc dot gnu.org
@ 2011-08-24 18:53 ` dominiq at lps dot ens.fr
2011-08-24 19:24 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-08-24 18:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-08-24 18:20:01 UTC ---
The code compiles with gfortran 4.6.1 and -O3 -ffast-math.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
` (2 preceding siblings ...)
2011-08-24 18:53 ` dominiq at lps dot ens.fr
@ 2011-08-24 19:24 ` jakub at gcc dot gnu.org
2011-08-25 8:30 ` [Bug tree-optimization/50178] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-24 19:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at gcc dot gnu.org,
| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-24 18:52:07 UTC ---
Fixed by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175074 (or perhaps
just made latent, hard to say).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
` (3 preceding siblings ...)
2011-08-24 19:24 ` jakub at gcc dot gnu.org
@ 2011-08-25 8:30 ` rguenth at gcc dot gnu.org
2011-09-01 7:02 ` irar at il dot ibm.com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-25 8:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
Target Milestone|--- |4.6.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
` (4 preceding siblings ...)
2011-08-25 8:30 ` [Bug tree-optimization/50178] " rguenth at gcc dot gnu.org
@ 2011-09-01 7:02 ` irar at il dot ibm.com
2011-09-01 8:31 ` irar at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: irar at il dot ibm.com @ 2011-09-01 7:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
Ira Rosen <irar at il dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at il dot ibm.com
--- Comment #5 from Ira Rosen <irar at il dot ibm.com> 2011-09-01 07:01:07 UTC ---
The problem here is that in vectorizable_call we replace the original call with
a dummy stmt and also remove its stmt_vec_info, which causes the segfault when
we try to access it through related pattern stmt. I'm testing the following
patch that updates related pattern stmt to be the dummy stmt:
Index: tree-vect-stmts.c
===================================================================
--- tree-vect-stmts.c (revision 178373)
+++ tree-vect-stmts.c (working copy)
@@ -1583,6 +1583,14 @@ vectorizable_call (gimple stmt, gimple_stmt_iterat
new_stmt = gimple_build_assign (gimple_call_lhs (stmt),
build_zero_cst (type));
set_vinfo_for_stmt (new_stmt, stmt_info);
+ /* For pattern statements make the related statement to point to
+ NEW_STMT in order to be able to retrieve the original statement
+ information later. */
+ if (is_pattern_stmt_p (stmt_info))
+ {
+ gimple related = STMT_VINFO_RELATED_STMT (stmt_info);
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (related)) = new_stmt;
+ }
set_vinfo_for_stmt (stmt, NULL);
STMT_VINFO_STMT (stmt_info) = new_stmt;
gsi_replace (gsi, new_stmt, false);
@@ -4957,11 +4965,7 @@ vect_transform_stmt (gimple stmt, gimple_stmt_iter
the stmt_info of ORIG_STMT_IN_PATTERN. See more details in the
documentation of vect_pattern_recog. */
if (STMT_VINFO_IN_PATTERN_P (stmt_vinfo))
- {
- gcc_assert (STMT_VINFO_RELATED_STMT (stmt_vinfo)
- == orig_scalar_stmt);
- STMT_VINFO_VEC_STMT (stmt_vinfo) = vec_stmt;
- }
+ STMT_VINFO_VEC_STMT (stmt_vinfo) = vec_stmt;
}
}
r175074 really fixed this problem since now we don't need to retrieve the
original def stmt.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
` (5 preceding siblings ...)
2011-09-01 7:02 ` irar at il dot ibm.com
@ 2011-09-01 8:31 ` irar at gcc dot gnu.org
2011-09-01 8:47 ` irar at gcc dot gnu.org
2011-09-01 9:05 ` irar at il dot ibm.com
8 siblings, 0 replies; 10+ messages in thread
From: irar at gcc dot gnu.org @ 2011-09-01 8:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
--- Comment #6 from irar at gcc dot gnu.org 2011-09-01 08:29:41 UTC ---
Author: irar
Date: Thu Sep 1 08:29:33 2011
New Revision: 178396
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178396
Log:
PR tree-optimization/50178
* tree-vect-stmts.c (vectorizable_call): Update the related
pattern statement before deleting the original call.
(vect_transform_stmt): Don't expect the related pattern statement
to match the original statement after transformation.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/vect/pr50178.f90
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-vect-stmts.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
` (6 preceding siblings ...)
2011-09-01 8:31 ` irar at gcc dot gnu.org
@ 2011-09-01 8:47 ` irar at gcc dot gnu.org
2011-09-01 9:05 ` irar at il dot ibm.com
8 siblings, 0 replies; 10+ messages in thread
From: irar at gcc dot gnu.org @ 2011-09-01 8:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
--- Comment #7 from irar at gcc dot gnu.org 2011-09-01 08:47:05 UTC ---
Author: irar
Date: Thu Sep 1 08:46:59 2011
New Revision: 178397
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178397
Log:
PR tree-optimization/50178
* gfortran.dg/vect/pr50178.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/vect/pr50178.f90
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/50178] [4.6 regression] ICE with gfortran -O3, not with gfortran -02
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
` (7 preceding siblings ...)
2011-09-01 8:47 ` irar at gcc dot gnu.org
@ 2011-09-01 9:05 ` irar at il dot ibm.com
8 siblings, 0 replies; 10+ messages in thread
From: irar at il dot ibm.com @ 2011-09-01 9:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50178
Ira Rosen <irar at il dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Ira Rosen <irar at il dot ibm.com> 2011-09-01 09:05:01 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-09-01 9:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24 17:22 [Bug middle-end/50178] New: [4.6 regression] ICE with gfortran -O3, not with gfortran -02 toon at moene dot org
2011-08-24 17:23 ` [Bug middle-end/50178] " toon at moene dot org
2011-08-24 18:00 ` burnus at gcc dot gnu.org
2011-08-24 18:53 ` dominiq at lps dot ens.fr
2011-08-24 19:24 ` jakub at gcc dot gnu.org
2011-08-25 8:30 ` [Bug tree-optimization/50178] " rguenth at gcc dot gnu.org
2011-09-01 7:02 ` irar at il dot ibm.com
2011-09-01 8:31 ` irar at gcc dot gnu.org
2011-09-01 8:47 ` irar at gcc dot gnu.org
2011-09-01 9:05 ` irar at il dot ibm.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).