comparison gcc/testsuite/gfortran.dg/pr70754.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 1830386684a0
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 ! { dg-do compile }
2 ! { dg-options "-Ofast" }
3 module m
4 implicit none
5 private
6 save
7
8 integer, parameter, public :: &
9 ii4 = selected_int_kind(6), &
10 rr8 = selected_real_kind(13)
11
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
20
21 do i=1,20
22 b(i,j) = 123 * a(i,j) + 34 * a(i,j+1) &
23 + 34 * a(i,j-1) + a(i+1,j+1) &
24 + a(i+1,j-1) + a(i-1,j+1) &
25 + a(i-1,j-1)
26 c(i,j) = 123
27 end do
28
29 where ((xyz(:,:,2) /= 0) .and. (c /= 0))
30 a = b/real(c)
31 elsewhere
32 a = 456
33 endwhere
34 end subroutine foo
35 end module m