Fix warnings occured during profiledboostrap on
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_12.f90
blob1ead1e7112e0ce014aa42bc0fec7531022cdab2f
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
29 ! { dg-final { cleanup-modules "assoc_err_m" } }