1! { dg-do compile }
2!
3! PR 55199: [OOP] Equivalenced variable has wrong type when used with generic member function
4!
5! Contributed by Rich Townsend <townsend@astro.wisc.edu>
6
7module assoc_err_m
8  implicit none
9  type :: foo_t
10   contains
11     procedure :: func_1
12     generic   :: func => func_1
13  end type
14contains
15  real function func_1 (this)
16    class(foo_t), intent(in) :: this
17  end function
18end module
19
20program assoc_err
21  use assoc_err_m
22  implicit none
23  type(foo_t) :: f
24  associate(b => f%func())
25    print *, 1. + b
26  end associate
27end program
28
29! { dg-final { cleanup-modules "assoc_err_m" } }
30