aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_44.f90
blob: 3ed65a88b5872c95fc65317c8da09d2e3c416819 (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
! { dg-do compile }
!
! PR 54949: [F03] abstract procedure pointers not rejected
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

  implicit none

  abstract interface
    subroutine abssub1
    end subroutine
  end interface
  pointer :: abssub1  ! { dg-error "PROCEDURE POINTER attribute conflicts with ABSTRACT attribute" }

  pointer :: abssub2
  abstract interface
    subroutine abssub2  ! { dg-error "PROCEDURE POINTER attribute conflicts with ABSTRACT attribute" }
    end subroutine
  end interface
  
  abssub1 => sub  ! { dg-error "is not a variable" }
  abssub2 => sub
  
contains

  subroutine sub
  end subroutine

end