* [Bug fortran/39595] gfortran falls over in optimization
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
@ 2009-03-31 8:24 ` KnowlesPJ at Cardiff dot ac dot uk
2009-03-31 9:49 ` [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361 rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: KnowlesPJ at Cardiff dot ac dot uk @ 2009-03-31 8:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from KnowlesPJ at Cardiff dot ac dot uk 2009-03-31 08:24 -------
Created an attachment (id=17567)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17567&action=view)
source and includes that demonstrate the problem
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
2009-03-31 8:24 ` [Bug fortran/39595] " KnowlesPJ at Cardiff dot ac dot uk
@ 2009-03-31 9:49 ` rguenth at gcc dot gnu dot org
2009-03-31 12:21 ` irar at il dot ibm dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-31 9:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-03-31 09:49 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at il dot ibm dot com
Status|UNCONFIRMED |NEW
Component|fortran |tree-optimization
Ever Confirmed|0 |1
GCC target triplet|i386-apple-darwin8.10.1 |i386-apple-darwin8.10.1,
| |x86_64-*-*
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2009-03-31 09:49:03
date| |
Summary|gfortran falls over in |[4.4/4.5 Regression]ICE in
|optimization |vectorizable_store at tree-
| |vect-transform.c:5361
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
2009-03-31 8:24 ` [Bug fortran/39595] " KnowlesPJ at Cardiff dot ac dot uk
2009-03-31 9:49 ` [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361 rguenth at gcc dot gnu dot org
@ 2009-03-31 12:21 ` irar at il dot ibm dot com
2009-03-31 12:34 ` jakub at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at il dot ibm dot com @ 2009-03-31 12:21 UTC (permalink / raw)
To: gcc-bugs
--
irar at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |irar at il dot ibm dot com
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-03-31 09:49:03 |2009-03-31 12:21:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (2 preceding siblings ...)
2009-03-31 12:21 ` irar at il dot ibm dot com
@ 2009-03-31 12:34 ` jakub at gcc dot gnu dot org
2009-03-31 12:52 ` dominiq at lps dot ens dot fr
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-31 12:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-03-31 12:34 -------
Simplified testcase:
c { dg-do compile }
c { dg-options "-O3" }
subroutine foo(a,c,i,m)
double precision a(4,*),b(3,64),c(3,200),d(64)
integer*8 i,j,k,l,m
do j=1,m,64
do k=1,m-j+1
d(k)=a(4,j-1+k)
do l=1,3
b(l,k)=c(l,i)+a(l,j-1+k)
end do
end do
call bar(b,d,i)
end do
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (3 preceding siblings ...)
2009-03-31 12:34 ` jakub at gcc dot gnu dot org
@ 2009-03-31 12:52 ` dominiq at lps dot ens dot fr
2009-03-31 16:48 ` hjl dot tools at gmail dot com
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-03-31 12:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dominiq at lps dot ens dot fr 2009-03-31 12:51 -------
On i686-apple-darwin9, I need -m64 to get an ICE with the test in comment #3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (4 preceding siblings ...)
2009-03-31 12:52 ` dominiq at lps dot ens dot fr
@ 2009-03-31 16:48 ` hjl dot tools at gmail dot com
2009-04-01 11:21 ` irar at il dot ibm dot com
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-03-31 16:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjl dot tools at gmail dot com 2009-03-31 16:45 -------
This is triggered by revision 143152:
http://gcc.gnu.org/ml/gcc-cvs/2009-01/msg00163.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (5 preceding siblings ...)
2009-03-31 16:48 ` hjl dot tools at gmail dot com
@ 2009-04-01 11:21 ` irar at il dot ibm dot com
2009-04-01 12:11 ` dominiq at lps dot ens dot fr
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at il dot ibm dot com @ 2009-04-01 11:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from irar at il dot ibm dot com 2009-04-01 11:21 -------
(In reply to comment #4)
> On i686-apple-darwin9, I need -m64 to get an ICE with the test in comment #3.
And if you change the types?
- double precision a(4,*),b(3,64),c(3,200),d(64)
+ dimension a(4,*),b(3,64),c(3,200),d(64)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (6 preceding siblings ...)
2009-04-01 11:21 ` irar at il dot ibm dot com
@ 2009-04-01 12:11 ` dominiq at lps dot ens dot fr
2009-04-01 12:50 ` dominiq at lps dot ens dot fr
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-01 12:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dominiq at lps dot ens dot fr 2009-04-01 12:11 -------
(In reply to comment #6)
> > On i686-apple-darwin9, I need -m64 to get an ICE with the test in comment #3.
>
> And if you change the types?
[ibook-dhum] f90/bug% gfc -c -O3 pr39595_db.f90
[ibook-dhum] f90/bug% gfc -c -m64 -O3 pr39595_db.f90
pr39595_db.f90: In function 'foo':
pr39595_db.f90:3: internal compiler error: vector VEC(tree,base) index domain
error, in vectorizable_store at tree-vect-stmts.c:3038
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (7 preceding siblings ...)
2009-04-01 12:11 ` dominiq at lps dot ens dot fr
@ 2009-04-01 12:50 ` dominiq at lps dot ens dot fr
2009-04-02 10:08 ` irar at il dot ibm dot com
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-01 12:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from dominiq at lps dot ens dot fr 2009-04-01 12:50 -------
On powerpc-apple-darwin9 the code in comment #3 compiles with -m64 -O3, but ICE
with the change in comment #6 with:
pr39595_db.f90: In function 'foo':
pr39595_db.f90:3: internal compiler error: vector VEC(tree,base) index domain
error, in vectorizable_store at tree-vect-stmts.c:3038
On i686-apple-darwin9 the original code in comment #1 ICE with -O3, but not
with -m64 -O3:
[ibook-dhum] bug/dftgrid% gfc -c -m64 -O3 dftgrid.f
[ibook-dhum] bug/dftgrid% gfc -c -O3 dftgrid.f
dftgrid.f: In function 'grid_neighbour_dint':
dftgrid.f:4288: internal compiler error: vector VEC(tree,base) index domain
error, in vectorizable_store at tree-vect-stmts.c:3038
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (8 preceding siblings ...)
2009-04-01 12:50 ` dominiq at lps dot ens dot fr
@ 2009-04-02 10:08 ` irar at il dot ibm dot com
2009-04-02 10:18 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at il dot ibm dot com @ 2009-04-02 10:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from irar at il dot ibm dot com 2009-04-02 10:07 -------
Will the following test do the job? (I added -m64 for target i686-*-*)
! { dg-do compile }
! { dg-options "-c -O3 -fdump-tree-vect-details -m64" { target i686-*-* } }
subroutine foo(a,c,i,m)
dimension a(4,*),b(3,64),c(3,200),d(64)
integer*8 i,j,k,l,m
do j=1,m,64
do k=1,m-j+1
d(k)=a(4,j-1+k)
do l=1,3
b(l,k)=c(l,i)+a(l,j-1+k)
end do
end do
call bar(b,d,i)
end do
end
! { dg-final { cleanup-tree-dump "vect" } }
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (9 preceding siblings ...)
2009-04-02 10:08 ` irar at il dot ibm dot com
@ 2009-04-02 10:18 ` jakub at gcc dot gnu dot org
2009-04-02 11:16 ` irar at il dot ibm dot com
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-02 10:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jakub at gcc dot gnu dot org 2009-04-02 10:18 -------
No, please don't ever add -m64 or -m32 to dg-options, that is something the
tester decides on in how it invokes make check. If a test is specific to -m64
or -m32, you should be using ilp32 or lp64 etc. effective target requirements,
but in this case there is nothing in the testcase that requires -m64, the test
just passes for some targets and fails for others.
Don't add -c, that's implicit for dg-do compile, you're adding it for second
time.
Also, I don't like the s/double precision/dimension/ change, the type of the
vars should be if possible explicit when you aren't testing the Fortran FE.
On x86_64-linux it fails with double precision, but also real, integer or
integer*8 instead of double precision, just don't leave the explicit type out.
The testcase as is in #c3 fails on x86_64-linux and succeeds on i686-linux and
RUNTESTFLAGS=--target_board=unix/-m32 on x86_64-linux, I guess on Darwin
similarly, it will fail with RUNTESTFLAGS=--target_board=unix/-m64.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (10 preceding siblings ...)
2009-04-02 10:18 ` jakub at gcc dot gnu dot org
@ 2009-04-02 11:16 ` irar at il dot ibm dot com
2009-04-02 12:39 ` irar at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at il dot ibm dot com @ 2009-04-02 11:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from irar at il dot ibm dot com 2009-04-02 11:16 -------
(In reply to comment #10)
> No, please don't ever add -m64 or -m32 to dg-options, that is something the
> tester decides on in how it invokes make check. If a test is specific to -m64
> or -m32, you should be using ilp32 or lp64 etc. effective target requirements,
> but in this case there is nothing in the testcase that requires -m64, the test
> just passes for some targets and fails for others.
> Don't add -c, that's implicit for dg-do compile, you're adding it for second
> time.
OK, thanks for the explanation!
> Also, I don't like the s/double precision/dimension/ change, the type of the
> vars should be if possible explicit when you aren't testing the Fortran FE.
> On x86_64-linux it fails with double precision, but also real, integer or
> integer*8 instead of double precision, just don't leave the explicit type out.
I will change it to real then (double does not get vectorized on PowerPC).
> The testcase as is in #c3 fails on x86_64-linux and succeeds on i686-linux and
> RUNTESTFLAGS=--target_board=unix/-m32 on x86_64-linux, I guess on Darwin
> similarly, it will fail with RUNTESTFLAGS=--target_board=unix/-m64.
Here is the final version (the test name will be O3-pr39595.f, so vect.exp will
append -O3 to the flags):
! { dg-do compile }
subroutine foo(a,c,i,m)
real a(4,*),b(3,64),c(3,200),d(64)
integer*8 i,j,k,l,m
do j=1,m,64
do k=1,m-j+1
d(k)=a(4,j-1+k)
do l=1,3
b(l,k)=c(l,i)+a(l,j-1+k)
end do
end do
call bar(b,d,i)
end do
end
! { dg-final { cleanup-tree-dump "vect" } }
Thanks,
Ira
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (11 preceding siblings ...)
2009-04-02 11:16 ` irar at il dot ibm dot com
@ 2009-04-02 12:39 ` irar at gcc dot gnu dot org
2009-04-02 18:08 ` irar at gcc dot gnu dot org
2009-04-02 19:19 ` jakub at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: irar at gcc dot gnu dot org @ 2009-04-02 12:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from irar at gcc dot gnu dot org 2009-04-02 12:39 -------
Subject: Bug 39595
Author: irar
Date: Thu Apr 2 12:39:28 2009
New Revision: 145445
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145445
Log:
PR tree-optimization/39595
* tree-vect-slp.c (vect_build_slp_tree): Check that the size of
interleaved loads group is not greater than the SLP group size.
Added:
trunk/gcc/testsuite/gfortran.dg/vect/O3-pr39595.f
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (12 preceding siblings ...)
2009-04-02 12:39 ` irar at gcc dot gnu dot org
@ 2009-04-02 18:08 ` irar at gcc dot gnu dot org
2009-04-02 19:19 ` jakub at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: irar at gcc dot gnu dot org @ 2009-04-02 18:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from irar at gcc dot gnu dot org 2009-04-02 18:08 -------
Subject: Bug 39595
Author: irar
Date: Thu Apr 2 18:08:10 2009
New Revision: 145465
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145465
Log:
PR tree-optimization/39595
* tree-vect-analyze.c (vect_build_slp_tree): Check that the size of
interleaved loads group is not greater than the SLP group size.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/vect/O3-pr39595.f
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
branches/gcc-4_4-branch/gcc/tree-vect-analyze.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/39595] [4.4/4.5 Regression]ICE in vectorizable_store at tree-vect-transform.c:5361
2009-03-31 8:24 [Bug fortran/39595] New: gfortran falls over in optimization KnowlesPJ at Cardiff dot ac dot uk
` (13 preceding siblings ...)
2009-04-02 18:08 ` irar at gcc dot gnu dot org
@ 2009-04-02 19:19 ` jakub at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-02 19:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jakub at gcc dot gnu dot org 2009-04-02 19:19 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39595
^ permalink raw reply [flat|nested] 16+ messages in thread