1! { dg-do compile }
2! PR fortran/83515 - ICE: Invalid expression in gfc_element_size
3! PR fortran/85797 - ICE in gfc_element_size, at fortran/target-memory.c:126
4! PR fortran/89904 - ICE in gfortran starting with r270045
5
6recursive subroutine a
7  c = transfer (a, b)           ! { dg-error "'SOURCE' argument of 'TRANSFER'" }
8end
9
10recursive subroutine d
11  c = transfer (b, d)           ! { dg-error "'MOLD' argument of 'TRANSFER'" }
12end
13
14subroutine f
15  use, intrinsic :: iso_c_binding
16  integer(c_intptr_t) :: b, c
17  procedure(), pointer :: a
18  c = transfer (a, b)
19  c = transfer (transfer (b, a), b)
20end
21
22module m
23contains
24  function f () result (z)
25    class(*), pointer :: z
26  end function f
27  recursive subroutine s (q)
28    procedure(f) :: q
29    call s (q)
30  end subroutine s
31end
32