diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/reassoc_4.f | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gfortran.dg/reassoc_4.f')
-rw-r--r-- | gcc/testsuite/gfortran.dg/reassoc_4.f | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/reassoc_4.f b/gcc/testsuite/gfortran.dg/reassoc_4.f new file mode 100644 index 000000000..1bcdf1893 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/reassoc_4.f @@ -0,0 +1,44 @@ +! { dg-do compile } +! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1" } +! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1 --param max-completely-peel-times=16" { target spu-*-* } } + subroutine anisonl(w,vo,anisox,s,ii1,jj1,weight) + integer ii1,jj1,i1,iii1,j1,jjj1,k1,l1,m1,n1 + real*8 w(3,3),vo(3,3),anisox(3,3,3,3),s(60,60),weight +! +! This routine replaces the following lines in e_c3d.f for +! an anisotropic material +! + do i1=1,3 + iii1=ii1+i1-1 + do j1=1,3 + jjj1=jj1+j1-1 + do k1=1,3 + do l1=1,3 + s(iii1,jjj1)=s(iii1,jjj1) + & +anisox(i1,k1,j1,l1)*w(k1,l1)*weight + do m1=1,3 + s(iii1,jjj1)=s(iii1,jjj1) + & +anisox(i1,k1,m1,l1)*w(k1,l1) + & *vo(j1,m1)*weight + & +anisox(m1,k1,j1,l1)*w(k1,l1) + & *vo(i1,m1)*weight + do n1=1,3 + s(iii1,jjj1)=s(iii1,jjj1) + & +anisox(m1,k1,n1,l1) + & *w(k1,l1)*vo(i1,m1)*vo(j1,n1)*weight + enddo + enddo + enddo + enddo + enddo + enddo + + return + end + +! There should be 22 multiplications left after un-distributing +! weigth, w(k1,l1), vo(i1,m1) and vo(j1,m1) on the innermost two +! unrolled loops. + +! { dg-final { scan-tree-dump-times "\[0-9\] \\\* " 22 "reassoc1" } } +! { dg-final { cleanup-tree-dump "reassoc1" } } |