2 ! { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-pre" }
5 type shell1quartet_type
7 integer(kind
=kind(1)) :: ab_l_sum
8 integer(kind
=kind(1)), dimension(:), pointer :: ab_form_3dints_x_indices
=> NULL()
9 integer(kind
=kind(1)), dimension(:), pointer :: ab_form_3dints_yz_rms_indices
=> NULL()
14 subroutine make_esss(self
,esss
)
15 type(shell1quartet_type
) :: self
17 real(kind
=kind(1.0d0)), dimension(:), intent(out
) :: esss
18 real(kind
=kind(1.0d0)), dimension(:), pointer :: Izz
19 real(kind
=kind(1.0d0)), dimension(:,:), pointer :: Ix
,Iy
,Iz
,Iyz
20 integer(kind
=kind(1)), dimension(:), pointer :: e_x
,ii_ivec
21 integer(kind
=kind(1)) :: dim
, dim1
, nroots
, ii
,z
,y
24 dim1
= self
%ab_l_sum
+2
26 call create_(Ix
,nroots
,dim
)
27 call create_(Iy
,nroots
,dim
)
28 call create_(Iz
,nroots
,dim
)
29 call create_(Iyz
,nroots
,dim
*dim1
/2)
31 e_x
=> self
%ab_form_3dints_x_indices
32 ii_ivec
=> self
%ab_form_3dints_yz_rms_indices
44 Iyz(:,ii
) = Izz
* Iy(:,y
)
47 esss
= esss
+ sum(Ix(:,e_x
) * Iyz(:,ii_ivec
),1)
53 ! There should be three loads from iyz.data, not four.
55 ! { dg-final { scan-tree-dump-times "= iyz.data" 3 "pre" } }
56 ! { dg-final { cleanup-tree-dump "pre" } }