This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/24524] Fortran dependency checking should reverse loops



------- Comment #4 from dominiq at lps dot ens dot fr  2010-07-09 12:11 -------
> This version fixes the problem with channel.f90 and has cleaned-up/extra
> comments

The patch in comment #3 fixes the problems with channel.f90, regstrapped and
passed my tests.
I have also checked that gfortran behaves as expected for the following test:


integer :: i(10) = [(k,k=1,10)], j(10)
j = i
j(9:3:-2) = j(7:1:-2)
print *, j
j = i
j(3:10:2) = j(1:8:2)
print *, j
j = i
j(3:9:2) = j(1:8:2)
print *, j
j = i
j(3:10:2) = j(1:7:2)
print *, j
end

Note that I think the code between lines 1039 and 1089 of dependency.c could be
refactored by testing first "that the strides are the same" and l_dir==r_dir,
then looking at the bounds with respect to the signs of, say, l_dir.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24524


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]