summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_decl_21.f90
blob: 4fd4020cb80c813bd49fe4a124ed034f99e9a3f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
! { dg-do compile }
!
! PR fortran/39414: PROCEDURE statement double declaration bug
!
! Discovered by Paul Thomas <pault@gcc.gnu.org>
! Modified by Janus Weil <janus@gcc.gnu.org>


! forbidden

procedure(integer) :: a
integer :: a   ! { dg-error "already has basic type of" }

integer :: b
procedure(integer) :: b	  ! { dg-error "already has basic type of" }

procedure(iabs) :: c
integer :: c   ! { dg-error "may not have basic type of" }

integer :: d
procedure(iabs) :: d   ! { dg-error "already has basic type of" }

! allowed

integer :: e
procedure() :: e

procedure() :: f
integer :: f

end