[Bug fortran/46842] [4.6 Regression] 465.tonto test run miscompares (even with -O0)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 --- Comment #15 from Tobias Burnus 2010-12-09 16:40:56 UTC --- (In reply to comment #14) > crystal.fppized.f90 is micompiled. If I compare 4.6.0 20100909 with today's GCC build for Tonto 2.3.1's crystal.F90, one sees in the original dump that the only TRANSPOSE relevant change is in the line: seitz = transpose(self%spacegroup%seitz(:,:,s)) (Older version: Call to _gfortran_transpose_r8, newer one not.) However, when I try to create an example out of it, it works as it should.
[Bug fortran/46842] [4.6 Regression] 465.tonto test run miscompares (even with -O0)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 --- Comment #14 from H.J. Lu 2010-12-09 14:48:46 UTC --- crystal.fppized.f90 is micompiled.
[Bug fortran/46842] [4.6 Regression] 465.tonto test run miscompares (even with -O0)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 --- Comment #13 from Tobias Burnus 2010-12-09 14:15:13 UTC --- Another reason for the Tonto failure could be PR 45777. I have now looked through the TRANSPOSEs of Tonto (cf. comment 11) - and I did not see anything which looks as if it could go wrong. I think it would help if someone with access to SPEC CPU 2006 could debug this further - and tell which version of Tonto is included in CPU 2006. I have looked the the source of the latest (2.3.1) - maybe the crucial code is an an earlier version. The issue of comment 12 does not seem to apply to Tonto - but it should be fixed nevertheless.
[Bug fortran/46842] [4.6 Regression] 465.tonto test run miscompares (even with -O0)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 --- Comment #12 from Tobias Burnus 2010-12-09 13:42:57 UTC --- The following is wrongly compiled - however, it is not a regression as it occurs since GCC 4.1. The solution is the same as for gfc_trans_arrayfunc_assign, where the same issue can occur. Cf. PR 44582. Due to the missing temporary, the array contains 88 88 88 88 instead of 88 1 88 3; the test case works with ifort, NAG and g95. (There is a slim chance that this is also the problem for Tonto as there was a time window in 4.6 where this optimization was never applied; it should have then also failed with 4.1 to 4.6.) integer :: a(2,2) a = reshape([1,2,3,4], [2,2]) call sub(transpose(a)) contains subroutine sub(x) integer :: x(:,:) a(1,:) = 88 a(2,:) = x(:,1) if (any (a(:,1) /= [88, 1]) & .or.any (a(:,2) /= [88, 3])) then print *, a call abort() end if end subroutine sub end
[Bug fortran/46842] [4.6 Regression] 465.tonto test run miscompares (even with -O0)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 --- Comment #11 from Tobias Burnus 2010-12-09 11:22:14 UTC --- I fear that debugging this will be not easy - especially as to my knowledge none of the gfortran developers has access to SPEC CPU 2006. * * * I tried http://sourceforge.net/projects/tonto-chem/files/tonto/2.3/tonto-2.3.1.tar.bz2/download If I compile it with a version before the regression, namely 4.6.0 20100909 (experimental) [trunk revision 164046] I get only failures with "make tests" - I have to recompile with "-fno-sign-zero" to reduce the failures. However, I still get failures (= differences) to the result of the Intel compiler. I think one could still try to find differences between such a version and a version after the TRANSPOSE committal. Compiling notice: You need to remove the "-std=f95" and - to speed up the very slow compile a tiny bit - remove also "-Wall -O". Additionally, as mentioned above, consider using "-fno-sign-zero". (In my case, the configuration is in platforms/GNU-gfortran-on-LINUX.) Unfortunately, almost all changes trigger a complete recompilation - and "make -j5" does not work. * * * I could find TRANSPOSEs in the files mo_localiser.F90, molecule.F90, vec{atom}.F90, marchingcube.F90, isosurface.F90, mat{cpx}.F90, mat3{real}.F90, spacegroup.F90, periodic_fmm_level.F90, cluster.F90, mat{real}.F90, run_mat{real}.F90, molecule.main.F90, unit_cell.F90 and crystal.F90. I tried to create some failing test myself, but they were handled properly.
[Bug fortran/46842] [4.6 Regression] 465.tonto test run miscompares (even with -O0)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 --- Comment #10 from H.J. Lu 2010-12-09 05:55:06 UTC --- This patch: http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01621.html is the cause, which says --- With this, the transpose optimization is back. The two previous patches permitted to call gfc_conv_expr_descriptor on transpose's arg, so now we just have to bypass the temporary generation in the transpose case. I don't add the testcase from the original commit as there is a wrong code regression introduced by this patch (uncaught by the testsuite) to be fixed in patch 5/5. --- But the patch 5/5 doesn't fix tonto.
[Bug fortran/46842] [4.6 Regression] 465.tonto test run miscompares (even with -O0)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 H.J. Lu changed: What|Removed |Added CC||mikael at gcc dot gnu.org Target Milestone|--- |4.6.0 Summary|465.tonto test run |[4.6 Regression] 465.tonto |miscompares (even with -O0) |test run miscompares (even ||with -O0) --- Comment #9 from H.J. Lu 2010-12-09 04:08:47 UTC --- This is caused by revision 164494: http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00791.html