diff options
author | Richard Biener <rguenther@suse.de> | 2015-12-03 08:38:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-12-03 08:38:10 +0000 |
commit | 8349b02428926171736d2db4e075566b98b1604c (patch) | |
tree | 12a9f2c531db92894e2ef42c6beb8b035894705d /gcc | |
parent | d8e3e8a57158160de8da130667c19796fe6e79d5 (diff) | |
download | gcc-8349b02428926171736d2db4e075566b98b1604c.zip gcc-8349b02428926171736d2db4e075566b98b1604c.tar.gz gcc-8349b02428926171736d2db4e075566b98b1604c.tar.bz2 |
re PR tree-optimization/68639 (ICE: Floating point exception)
2015-12-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/68639
* tree-vect-data-refs.c (dr_group_sort_cmp): Split groups
belonging to different loops.
(vect_analyze_data_ref_accesses): Likewise.
* gfortran.fortran-torture/compile/pr68639.f90: New testcase.
From-SVN: r231220
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/compile/pr68639.f90 | 22 | ||||
-rw-r--r-- | gcc/tree-vect-data-refs.c | 12 |
4 files changed, 46 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae92402..5192421 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-12-03 Richard Biener <rguenther@suse.de> + + PR tree-optimization/68639 + * tree-vect-data-refs.c (dr_group_sort_cmp): Split groups + belonging to different loops. + (vect_analyze_data_ref_accesses): Likewise. + 2015-12-02 Jan Hubicka <hubicka@ucw.cz> * ipa-pure-const.c (ignore_edge_for_pure_const): New function. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e9f6b8..738d561 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-12-03 Richard Biener <rguenther@suse.de> + + PR tree-optimization/68639 + * gfortran.fortran-torture/compile/pr68639.f90: New testcase. + 2015-12-02 Jan Hubicka <hubicka@ucw.cz> PR ipa/68184 diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr68639.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr68639.f90 new file mode 100644 index 0000000..bd1c3a3 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr68639.f90 @@ -0,0 +1,22 @@ + SUBROUTINE makeCoulE0(natorb,Coul) + INTEGER, PARAMETER :: dp=8 + REAL(KIND=dp), PARAMETER :: fourpi=432.42, oorootpi=13413.3142 + INTEGER :: natorb + REAL(KIND=dp), DIMENSION(45, 45), & + INTENT(OUT) :: Coul + INTEGER :: gpt, imA, imB, k1, k2, k3, & + k4, lp, mp, np + REAL(KIND=dp) :: alpha, d2f(3,3), & + d4f(3,3,3,3), f, ff, w + REAL(KIND=dp), DIMENSION(3, 45) :: M1A + REAL(KIND=dp), DIMENSION(45) :: M0A + DO imA=1, (natorb*(natorb+1))/2 + DO imB=1, (natorb*(natorb+1))/2 + w= M0A(imA)*M0A(imB) + DO k1=1,3 + w=w+ M1A(k1,imA)*M1A(k1,imB) + ENDDO + Coul(imA,imB)=Coul(imA,imB)-4.0_dp*alpha**3*oorootpi*w/3.0_dp + ENDDO + ENDDO + END SUBROUTINE makeCoulE0 diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index b59b40c..8810af1 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2597,6 +2597,12 @@ dr_group_sort_cmp (const void *dra_, const void *drb_) if (dra == drb) return 0; + /* DRs in different loops never belong to the same group. */ + loop_p loopa = gimple_bb (DR_STMT (dra))->loop_father; + loop_p loopb = gimple_bb (DR_STMT (drb))->loop_father; + if (loopa != loopb) + return loopa->num < loopb->num ? -1 : 1; + /* Ordering of DRs according to base. */ if (!operand_equal_p (DR_BASE_ADDRESS (dra), DR_BASE_ADDRESS (drb), 0)) { @@ -2688,6 +2694,12 @@ vect_analyze_data_ref_accesses (vec_info *vinfo) matters we can push those to a worklist and re-iterate over them. The we can just skip ahead to the next DR here. */ + /* DRs in a different loop should not be put into the same + interleaving group. */ + if (gimple_bb (DR_STMT (dra))->loop_father + != gimple_bb (DR_STMT (drb))->loop_father) + break; + /* Check that the data-refs have same first location (except init) and they are both either store or load (not load and store, not masked loads or stores). */ |