annotate gcc/testsuite/gfortran.dg/unlimited_polymorphic_4.f03 @ 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 !
kono
parents:
diff changeset
3 ! Fix PR55763
kono
parents:
diff changeset
4 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 module mpi_f08_f
kono
parents:
diff changeset
7 implicit none
kono
parents:
diff changeset
8 abstract interface
kono
parents:
diff changeset
9 subroutine user_function( inoutvec )
kono
parents:
diff changeset
10 class(*), dimension(:), intent(inout) :: inoutvec
kono
parents:
diff changeset
11 end subroutine user_function
kono
parents:
diff changeset
12 end interface
kono
parents:
diff changeset
13 end module
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 module mod_test1
kono
parents:
diff changeset
16 use mpi_f08_f
kono
parents:
diff changeset
17 implicit none
kono
parents:
diff changeset
18 contains
kono
parents:
diff changeset
19 subroutine my_function( invec ) ! { dg-error "no IMPLICIT type" }
kono
parents:
diff changeset
20 class(*), dimension(:), intent(inout) :: inoutvec ! { dg-error "not a DUMMY" }
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 select type (inoutvec)
kono
parents:
diff changeset
23 type is (integer)
kono
parents:
diff changeset
24 inoutvec = 2*inoutvec
kono
parents:
diff changeset
25 end select
kono
parents:
diff changeset
26 end subroutine my_function
kono
parents:
diff changeset
27 end module
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 module mod_test2
kono
parents:
diff changeset
30 use mpi_f08_f
kono
parents:
diff changeset
31 implicit none
kono
parents:
diff changeset
32 contains
kono
parents:
diff changeset
33 subroutine my_function( inoutvec ) ! Used to produce a BOGUS ERROR
kono
parents:
diff changeset
34 class(*), dimension(:), intent(inout) :: inoutvec
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 select type (inoutvec)
kono
parents:
diff changeset
37 type is (integer)
kono
parents:
diff changeset
38 inoutvec = 2*inoutvec
kono
parents:
diff changeset
39 end select
kono
parents:
diff changeset
40 end subroutine my_function
kono
parents:
diff changeset
41 end module