* [Bug middle-end/50902] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
@ 2011-10-28 16:01 ` howarth at nitro dot med.uc.edu
2011-10-28 16:11 ` howarth at nitro dot med.uc.edu
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-10-28 16:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #1 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-10-28 16:01:35 UTC ---
Uploaded testcase which can reproduce the ICE with...
g++-fsf-4.7 -c dinternal.ii -O2 -ftree-vectorize -fpermissive -DX_MMAP_FLAGS=0
-DFORTRAN_INIT -fno-common -DDARWIN -D_REENTRANT -DNDEBUG -DCPLUSPLUS
-DUSE_CDS_NAMESPACE
for gcc trunk built with...
Using built-in specs.
COLLECT_GCC=g++-fsf-4.7
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.2.0/4.7.0/lto-wrapper
Target: x86_64-apple-darwin11.2.0
Configured with: ../gcc-4.7-20111028/configure --prefix=/sw
--prefix=/sw/lib/gcc4.7 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.7/info
--with-build-config=bootstrap-lto --enable-stage1-languages=c,lto
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--program-suffix=-fsf-4.7 --enable-checking=yes --enable-cloog-backend=isl
Thread model: posix
gcc version 4.7.0 20111028 (experimental) (GCC)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/50902] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
2011-10-28 16:01 ` [Bug middle-end/50902] " howarth at nitro dot med.uc.edu
@ 2011-10-28 16:11 ` howarth at nitro dot med.uc.edu
2011-10-28 16:35 ` howarth at nitro dot med.uc.edu
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-10-28 16:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #2 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-10-28 16:11:38 UTC ---
Created attachment 25645
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25645
gdb log for single stepping from last call to tree.c:1382 before crash
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/50902] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
2011-10-28 16:01 ` [Bug middle-end/50902] " howarth at nitro dot med.uc.edu
2011-10-28 16:11 ` howarth at nitro dot med.uc.edu
@ 2011-10-28 16:35 ` howarth at nitro dot med.uc.edu
2011-10-28 17:35 ` howarth at nitro dot med.uc.edu
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-10-28 16:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #3 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-10-28 16:35:21 UTC ---
Could this be an unresolved corner-case of PR48098?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/50902] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (2 preceding siblings ...)
2011-10-28 16:35 ` howarth at nitro dot med.uc.edu
@ 2011-10-28 17:35 ` howarth at nitro dot med.uc.edu
2011-10-28 17:36 ` howarth at nitro dot med.uc.edu
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-10-28 17:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #4 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-10-28 17:34:30 UTC ---
Created attachment 25647
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25647
preprocessed source for marvin/MarvinNOEPotential.cc
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/50902] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (3 preceding siblings ...)
2011-10-28 17:35 ` howarth at nitro dot med.uc.edu
@ 2011-10-28 17:36 ` howarth at nitro dot med.uc.edu
2011-10-29 17:39 ` howarth at nitro dot med.uc.edu
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-10-28 17:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #5 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-10-28 17:35:50 UTC ---
The attached MarvinNOEPotential.ii preprocessed source is another instance of
this bug in the xplor-nih 2.27 build...
g++-fsf-4.7 -c MarvinNOEPotential.ii -O2 -ftree-vectorize -fpermissive
-DX_MMAP_FLAGS=0 -DFORTRAN_INIT -fno-common -DDARWIN -D_REENTRANT -DNDEBUG
-DCPLUSPLUS -DUSE_CDS_NAMESPACE -LANG:std
In file included from MarvinNOEPotential.cc:2787:0:
/Users/howarth/xplor-nih-2.27/CDSlib/cdsMatrix.cc: In constructor
‘CDSMatrixBase<T>::CDSMatrixBase(int, int, const T&) [with T = bool]’:
/Users/howarth/xplor-nih-2.27/CDSlib/cdsMatrix.cc:24:1: internal compiler
error: in build_vector_from_val, at tree.c:1382
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/50902] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (4 preceding siblings ...)
2011-10-28 17:36 ` howarth at nitro dot med.uc.edu
@ 2011-10-29 17:39 ` howarth at nitro dot med.uc.edu
2011-10-30 9:43 ` [Bug tree-optimization/50902] [4.7 Regression] " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-10-29 17:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #6 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-10-29 17:39:43 UTC ---
Confirmed that both the dinternal.ii and MarvinNOEPotential.ii test cases
reproduce this ICE using current gcc trunk under x86_64 Fedora 15.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/50902] [4.7 Regression] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (5 preceding siblings ...)
2011-10-29 17:39 ` howarth at nitro dot med.uc.edu
@ 2011-10-30 9:43 ` rguenth at gcc dot gnu.org
2011-11-01 8:25 ` irar at il dot ibm.com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-30 9:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
Target Milestone|--- |4.7.0
Summary|intVar/dinternal.cc ICEs at |[4.7 Regression]
|-O2 -ftree-vectorize |intVar/dinternal.cc ICEs at
| |-O2 -ftree-vectorize
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/50902] [4.7 Regression] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (6 preceding siblings ...)
2011-10-30 9:43 ` [Bug tree-optimization/50902] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-11-01 8:25 ` irar at il dot ibm.com
2011-11-01 13:08 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: irar at il dot ibm.com @ 2011-11-01 8:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
Ira Rosen <irar at il dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-11-01
CC| |irar at il dot ibm.com
Ever Confirmed|0 |1
--- Comment #7 from Ira Rosen <irar at il dot ibm.com> 2011-11-01 08:25:08 UTC ---
Reduced testcase:
_Bool data[128];
void foo (_Bool *init)
{
int i;
for (i = 0; i < 128; i++)
data[i] = *init;
}
gcc_checking_assert (types_compatible_p (TYPE_MAIN_VARIANT (TREE_TYPE (sc)),
TREE_TYPE (vectype)));
fails since VECTYPE is vector(16) <unnamed-unsigned:8>
and the scalar type is _Bool
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/50902] [4.7 Regression] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (7 preceding siblings ...)
2011-11-01 8:25 ` irar at il dot ibm.com
@ 2011-11-01 13:08 ` rguenth at gcc dot gnu.org
2011-11-01 16:54 ` howarth at nitro dot med.uc.edu
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-01 13:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
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 #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-01 13:06:57 UTC ---
Mine.
Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c (revision 180737)
+++ gcc/tree-vect-stmts.c (working copy)
@@ -4726,11 +4726,20 @@
/* 4. Handle invariant-load. */
if (inv_p && !bb_vinfo)
{
- tree vec_inv;
+ tree tem, vec_inv;
gimple_stmt_iterator gsi2 = *gsi;
gcc_assert (!strided_load);
gsi_next (&gsi2);
- vec_inv = build_vector_from_val (vectype, scalar_dest);
+ tem = scalar_dest;
+ if (!useless_type_conversion_p (TREE_TYPE (vectype),
+ TREE_TYPE (tem)))
+ {
+ tem = fold_convert (TREE_TYPE (vectype), tem);
+ tem = force_gimple_operand_gsi (&gsi2, tem, true,
+ NULL_TREE, true,
+ GSI_SAME_STMT);
+ }
+ vec_inv = build_vector_from_val (vectype, tem);
new_temp = vect_init_vector (stmt, vec_inv,
vectype, &gsi2);
new_stmt = SSA_NAME_DEF_STMT (new_temp);
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/50902] [4.7 Regression] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (8 preceding siblings ...)
2011-11-01 13:08 ` rguenth at gcc dot gnu.org
@ 2011-11-01 16:54 ` howarth at nitro dot med.uc.edu
2011-11-02 10:22 ` rguenth at gcc dot gnu.org
2011-11-02 10:22 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-11-01 16:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #9 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-11-01 16:53:09 UTC ---
(In reply to comment #8)
I can confirm that the proposed patch resolves the build failures in xplor-nih
without regressions in the xplor-nih testsuite.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/50902] [4.7 Regression] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (9 preceding siblings ...)
2011-11-01 16:54 ` howarth at nitro dot med.uc.edu
@ 2011-11-02 10:22 ` rguenth at gcc dot gnu.org
2011-11-02 10:22 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-02 10:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 10:20:51 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/50902] [4.7 Regression] intVar/dinternal.cc ICEs at -O2 -ftree-vectorize
2011-10-28 15:59 [Bug middle-end/50902] New: intVar/dinternal.cc ICEs at -O2 -ftree-vectorize howarth at nitro dot med.uc.edu
` (10 preceding siblings ...)
2011-11-02 10:22 ` rguenth at gcc dot gnu.org
@ 2011-11-02 10:22 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-02 10:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50902
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 10:20:36 UTC ---
Author: rguenth
Date: Wed Nov 2 10:20:32 2011
New Revision: 180765
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180765
Log:
2011-11-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50902
* tree-vect-stmts.c (vectorizable_load): Properly convert
an invariant initializer element.
* gcc.dg/torture/pr50902.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr50902.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c
^ permalink raw reply [flat|nested] 13+ messages in thread