1! { dg-do preprocess }
2! { dg-additional-options "-cpp" }
3! PR 57048 - this used not to compile. Original test case by Angelo
4! Graziosi.  Only works if compiled c_funptr_1_mod.f90, hence the
5! do-nothing directive above.
6module procs
7
8  implicit none
9  private
10
11  public WndProc
12
13contains
14  function WndProc()
15    integer :: WndProc
16
17    WndProc = 0
18  end function WndProc
19end module procs
20
21function WinMain()
22  use, intrinsic :: iso_c_binding, only: C_INT,c_sizeof,c_funloc
23  use win32_types
24  use procs
25  implicit none
26
27  integer :: WinMain
28
29  type(WNDCLASSEX_T) :: WndClass
30
31  WndClass%cbSize = int(c_sizeof(Wndclass),C_INT)
32  WndClass%lpfnWndProc = c_funloc(WndProc)
33
34  WinMain = 0
35end function WinMain
36
37program main
38end
39