modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr70754.f90
blob593acf917ee63d92cdce43fbd159f89a50918f11
1 ! { dg-do compile }
2 ! { dg-options "-Ofast" }
3 module m
4 implicit none
5 private
6 save
8 integer, parameter, public :: &
9 ii4 = selected_int_kind(6), &
10 rr8 = selected_real_kind(13)
12 integer (ii4), dimension(40,40,199), public :: xyz
13 public :: foo
14 contains
15 subroutine foo(a)
16 real (rr8), dimension(40,40), intent(out) :: a
17 real (rr8), dimension(40,40) :: b
18 integer (ii4), dimension(40,40) :: c
19 integer i, j
21 j = 10
22 do i=11,30
23 b(i,j) = 123 * a(i,j) + 34 * a(i,j+1) &
24 + 34 * a(i,j-1) + a(i+1,j+1) &
25 + a(i+1,j-1) + a(i-1,j+1) &
26 + a(i-1,j-1)
27 c(i,j) = 123
28 end do
30 where ((xyz(:,:,2) /= 0) .and. (c /= 0))
31 a = b/real(c)
32 elsewhere
33 a = 456
34 endwhere
35 end subroutine foo
36 end module m