gcc/testsuite/gfortran.dg/class_assign_2.f90
raw| 1 | ! { dg-do link } |
| 2 | ! |
| 3 | ! PR 86484:[OOP] Undefined symbol when using polymorphic intrinsic assignment |
| 4 | ! |
| 5 | ! Contributed by Rich Townsend <[email protected]> |
| 6 | |
| 7 | program test_assign |
| 8 | |
| 9 | implicit none |
| 10 | |
| 11 | type :: foo_t |
| 12 | end type |
| 13 | |
| 14 | type, extends (foo_t) :: bar_t |
| 15 | end type |
| 16 | |
| 17 | class(foo_t), allocatable :: f |
| 18 | type(bar_t) :: b |
| 19 | |
| 20 | f = b |
| 21 | |
| 22 | end |