Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/associate_12.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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 | |
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 | |
19 | |
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 |