annotate gcc/testsuite/gfortran.dg/optional_dim_2.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! PR33317 CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
kono
parents:
diff changeset
3 ! Test case submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
kono
parents:
diff changeset
4 program test
kono
parents:
diff changeset
5 implicit none
kono
parents:
diff changeset
6 call sub(bound=.false., dimmy=1_8)
kono
parents:
diff changeset
7 call sub()
kono
parents:
diff changeset
8 contains
kono
parents:
diff changeset
9 subroutine sub(bound, dimmy)
kono
parents:
diff changeset
10 integer(kind=8), optional :: dimmy
kono
parents:
diff changeset
11 logical, optional :: bound
kono
parents:
diff changeset
12 logical :: lotto(4)
kono
parents:
diff changeset
13 character(20) :: testbuf
kono
parents:
diff changeset
14 lotto = .false.
kono
parents:
diff changeset
15 lotto = cshift((/.true.,.false.,.true.,.false./),1,dim=dimmy)
kono
parents:
diff changeset
16 write(testbuf,*) lotto
kono
parents:
diff changeset
17 if (trim(testbuf).ne." F T F T") call abort
kono
parents:
diff changeset
18 lotto = .false.
kono
parents:
diff changeset
19 lotto = eoshift((/.true.,.true.,.true.,.true./),1,boundary=bound,dim=dimmy)
kono
parents:
diff changeset
20 lotto = eoshift(lotto,1,dim=dimmy)
kono
parents:
diff changeset
21 write(testbuf,*) lotto
kono
parents:
diff changeset
22 if (trim(testbuf).ne." T T F F") call abort
kono
parents:
diff changeset
23 end subroutine
kono
parents:
diff changeset
24 end program test