hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_20.f90
blobf430ce83c450f0e9e94b39b3d8213bff4ef0b2ca
1 ! { dg-do compile }
3 ! PR 40869: [F03] PPC assignment checking
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 implicit none
9 interface func
10 procedure f1,f2
11 end interface
13 interface operator(.op.)
14 procedure f1,f2
15 end interface
17 type :: t1
18 procedure(integer), pointer, nopass :: ppc
19 end type
21 type :: t2
22 procedure(real), pointer, nopass :: ppc
23 end type
25 type(t1) :: o1
26 type(t2) :: o2
27 procedure(logical),pointer :: pp1
28 procedure(complex),pointer :: pp2
30 pp1 => pp2 ! { dg-error "Type mismatch in function result" }
31 pp2 => o2%ppc ! { dg-error "Type mismatch in function result" }
33 o1%ppc => pp1 ! { dg-error "Type mismatch in function result" }
34 o1%ppc => o2%ppc ! { dg-error "Type mismatch in function result" }
36 contains
38 real function f1(a,b) ! { dg-error "Ambiguous interfaces" }
39 real,intent(in) :: a,b
40 f1 = a + b
41 end function
43 integer function f2(a,b) ! { dg-error "Ambiguous interfaces" }
44 real,intent(in) :: a,b
45 f2 = a - b
46 end function
48 end