2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_14.f90
blob90037a1a5ab80e0e4deaac784081d6b526397020
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR 39692: f95: conflict between EXTERNAL and POINTER
6 ! Test for Procedure Pointers (without PROCEDURE statements) with the -std=f95 flag.
8 ! Contributed by Janus Weil <janus@gcc.gnu.org>
10 pointer :: f
11 external :: f ! { dg-error "Fortran 2003: Procedure pointer" }
13 external :: g
14 pointer :: g ! { dg-error "Fortran 2003: Procedure pointer" }
16 real, pointer, external :: h ! { dg-error "Fortran 2003: Procedure pointer" }
18 interface
19 subroutine i
20 end subroutine i
21 end interface
22 pointer :: i ! { dg-error "Fortran 2003: Procedure pointer" }
24 pointer :: j
25 interface
26 real function j()
27 end function j ! { dg-error "Fortran 2003: Procedure pointer" }
28 end interface
30 contains
32 function k() ! { dg-error "attribute conflicts with" }
33 intrinsic sin
34 external k
35 pointer k ! { dg-error "Fortran 2003: Procedure pointer" }
36 real k
37 end function k
39 end