OSDN Git Service

* MAINTAINERS: Add myself as a maintainer for the RX port.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / reassoc_4.f
1 ! { dg-do compile }
2 ! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1" }
3       subroutine anisonl(w,vo,anisox,s,ii1,jj1,weight)
4       integer ii1,jj1,i1,iii1,j1,jjj1,k1,l1,m1,n1
5       real*8 w(3,3),vo(3,3),anisox(3,3,3,3),s(60,60),weight
6 !
7 !     This routine replaces the following lines in e_c3d.f for
8 !     an anisotropic material
9 !
10                       do i1=1,3
11                         iii1=ii1+i1-1
12                         do j1=1,3
13                           jjj1=jj1+j1-1
14                           do k1=1,3
15                             do l1=1,3
16                               s(iii1,jjj1)=s(iii1,jjj1)
17      &                          +anisox(i1,k1,j1,l1)*w(k1,l1)*weight
18                               do m1=1,3
19                                 s(iii1,jjj1)=s(iii1,jjj1)
20      &                              +anisox(i1,k1,m1,l1)*w(k1,l1)
21      &                                 *vo(j1,m1)*weight
22      &                              +anisox(m1,k1,j1,l1)*w(k1,l1)
23      &                                 *vo(i1,m1)*weight
24                                 do n1=1,3
25                                   s(iii1,jjj1)=s(iii1,jjj1)
26      &                              +anisox(m1,k1,n1,l1)
27      &                              *w(k1,l1)*vo(i1,m1)*vo(j1,n1)*weight
28                                 enddo
29                               enddo
30                             enddo
31                           enddo
32                         enddo
33                       enddo
34
35       return
36       end
37
38 ! There should be 22 multiplications left after un-distributing
39 ! weigth, w(k1,l1), vo(i1,m1) and vo(j1,m1) on the innermost two
40 ! unrolled loops.
41
42 ! { dg-final { scan-tree-dump-times "\[0-9\] \\\* " 22 "reassoc1" } }
43 ! { dg-final { cleanup-tree-dump "reassoc1" } }