Mercurial > hg > CbC > CbC_gcc
comparison 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 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 ! { dg-do run } | |
2 ! PR33317 CSHIFT/EOSHIFT: Rejects optional dummy for DIM= | |
3 ! Test case submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org> | |
4 program test | |
5 implicit none | |
6 call sub(bound=.false., dimmy=1_8) | |
7 call sub() | |
8 contains | |
9 subroutine sub(bound, dimmy) | |
10 integer(kind=8), optional :: dimmy | |
11 logical, optional :: bound | |
12 logical :: lotto(4) | |
13 character(20) :: testbuf | |
14 lotto = .false. | |
15 lotto = cshift((/.true.,.false.,.true.,.false./),1,dim=dimmy) | |
16 write(testbuf,*) lotto | |
17 if (trim(testbuf).ne." F T F T") call abort | |
18 lotto = .false. | |
19 lotto = eoshift((/.true.,.true.,.true.,.true./),1,boundary=bound,dim=dimmy) | |
20 lotto = eoshift(lotto,1,dim=dimmy) | |
21 write(testbuf,*) lotto | |
22 if (trim(testbuf).ne." T T F F") call abort | |
23 end subroutine | |
24 end program test |