re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_12.f90
blob8d2abb8adb1535f73158e6a02451899d348d6f11
1 ! { dg-do compile }
3 ! PR 55199: [OOP] Equivalenced variable has wrong type when used with generic member function
5 ! Contributed by Rich Townsend <townsend@astro.wisc.edu>
7 module assoc_err_m
8 implicit none
9 type :: foo_t
10 contains
11 procedure :: func_1
12 generic :: func => func_1
13 end type
14 contains
15 real function func_1 (this)
16 class(foo_t), intent(in) :: this
17 end function
18 end module
20 program 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
27 end program