1! { dg-do compile }
2!
3! PR 50517: gfortran must detect that actual argument type is different from dummy argument type (r178939)
4!
5! Contributed by Vittorio Zecca <zeccav@gmail.com>
6
7program main
8
9  type t
10    integer g
11  end type
12
13  type u
14    integer g
15  end type
16
17  type(u), external :: ufunc
18  call sub(ufunc)            ! { dg-error "Type mismatch in function result" }
19
20contains
21
22  subroutine sub(tfunc)
23    type(t), external :: tfunc
24  end subroutine
25
26end program
27