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