]>
Commit | Line | Data |
---|---|---|
62d3c075 PT |
1 | ! { dg-do run } |
2 | ! | |
3 | ! Checks the fix for PR60483. | |
4 | ! | |
5 | ! Contributed by Anthony Lewis <antony@cosmologist.info> | |
6 | ! | |
7 | module A | |
8 | implicit none | |
9 | Type T | |
10 | integer :: val = 2 | |
11 | contains | |
12 | final :: testfree | |
13 | end type | |
14 | integer :: final_flag = 0 | |
15 | contains | |
16 | subroutine testfree(this) | |
17 | Type(T) this | |
18 | final_flag = this%val + final_flag | |
19 | end subroutine | |
20 | subroutine Testf() | |
21 | associate(X => T()) ! This was failing: Symbol 'x' at (1) has no IMPLICIT type | |
22 | final_flag = X%val | |
23 | end associate | |
d7caf313 | 24 | if (final_flag .ne. 2) stop 1 |
62d3c075 PT |
25 | end subroutine Testf |
26 | end module | |
27 | ||
28 | use A | |
29 | call Testf | |
30 | end |