annotate gcc/testsuite/gfortran.dg/actual_array_vect_1.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! PR fortran/32323
kono
parents:
diff changeset
3 ! Array sections with vector subscripts are not allowed
kono
parents:
diff changeset
4 ! with dummy arguments which have VOLATILE or INTENT OUT/INOUT
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 ! Contributed by terry@chem.gu.se
kono
parents:
diff changeset
7 !
kono
parents:
diff changeset
8 module mod
kono
parents:
diff changeset
9 implicit none
kono
parents:
diff changeset
10 contains
kono
parents:
diff changeset
11 subroutine aa(v)
kono
parents:
diff changeset
12 integer,dimension(:),volatile::v
kono
parents:
diff changeset
13 write(*,*)size(v)
kono
parents:
diff changeset
14 v=0
kono
parents:
diff changeset
15 end subroutine aa
kono
parents:
diff changeset
16 subroutine bb(v)
kono
parents:
diff changeset
17 integer,dimension(:),intent(out)::v
kono
parents:
diff changeset
18 write(*,*)size(v)
kono
parents:
diff changeset
19 v=0
kono
parents:
diff changeset
20 end subroutine bb
kono
parents:
diff changeset
21 end module mod
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 program ff
kono
parents:
diff changeset
24 use mod
kono
parents:
diff changeset
25 implicit none
kono
parents:
diff changeset
26 integer,dimension(10)::w
kono
parents:
diff changeset
27 w=1
kono
parents:
diff changeset
28 call aa(w(2:4))
kono
parents:
diff changeset
29 call aa(w((/3,2,1/))) ! { dg-error "vector subscript" }
kono
parents:
diff changeset
30 call bb(w(2:4))
kono
parents:
diff changeset
31 call bb(w((/3,2,1/))) ! { dg-error "vector subscript" }
kono
parents:
diff changeset
32 write(*,*)w
kono
parents:
diff changeset
33 end