summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/ldist-pr43023.f90
blob: 3e2d04c949017d956eac41666361ea0e528f98f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
! { dg-do compile }
! { dg-options "-O2 -ftree-loop-distribution" }

MODULE NFT_mod

implicit none
integer :: Nangle
real:: Z0
real, dimension(:,:), allocatable :: Angle
real, dimension(:), allocatable :: exth, ezth, hxth, hyth, hyphi

CONTAINS

SUBROUTINE NFT_Init()

real :: th, fi
integer :: n

do n = 1,Nangle
  th = Angle(n,1)
  fi = Angle(n,2)

  exth(n) =  cos(fi)*cos(th)
  ezth(n) = -sin(th)
  hxth(n) = -sin(fi)
  hyth(n) =  cos(fi)
  hyphi(n) = -sin(fi)
end do
END SUBROUTINE NFT_Init

END MODULE NFT_mod