Hello world,
with the bump in the libfortran version that is needed with
Paul's patch, I think we can get rid of a few functions
that we do not actually need any more.
I think we now always inline SUM and PRODUCT. We don't do so with all
occurrences of ANY and ALL, but we probably could (and should).
So, is it a worthy goal to eliminate all occurences of these
functions from libgfortran before 8.1 comes out?
Regards
Thomas
BTW, here are test cases for SUM and PRODUCT:
ig25@linux-d6cw:~/Krempel/Sum> cat pr.f90
program main
real, dimension(10,10,10) :: a
real, dimension(10,10) :: b
real :: s
call random_number(a)
s = product(a)
print *,s
s = product(a,a>0.3)
print *,s
b = product(a,dim=2,mask=a>0.3)
print *,b
print *,product(a)
print *,product(a,a>3)
print *,product(a,dim=2,mask=a>0.3)
end program main
ig25@linux-d6cw:~/Krempel/Sum> gfortran -fdump-tree-original pr.f90 &&
grep -i product pr.f90.003t.original
ig25@linux-d6cw:~/Krempel/Sum> cat su.f90
program main
real, dimension(10,10,10) :: a
real, dimension(10,10) :: b
real :: s
call random_number(a)
s = sum(a)
print *,s
s = sum(a,a>0.3)
print *,s
b = sum(a,dim=2,mask=a>0.3)
print *,b
print *,sum(a)
print *,sum(a,a>3)
print *,sum(a,dim=2,mask=a>0.3)
end program main
ig25@linux-d6cw:~/Krempel/Sum> gfortran -fdump-tree-original su.f90 &&
grep -i sum su.f90.003t.original
ig25@linux-d6cw:~/Krempel/Sum>