gcc/testsuite/gfortran.dg/pr82774.f90
raw| 1 | ! { dg-do run } |
| 2 | ! |
| 3 | ! Contributed by Steve Kargl <[email protected]> |
| 4 | ! |
| 5 | program main |
| 6 | implicit none |
| 7 | type stuff |
| 8 | character(:), allocatable :: key |
| 9 | end type stuff |
| 10 | type(stuff) nonsense, total |
| 11 | nonsense = stuff('Xe') |
| 12 | total = stuff(nonsense%key) ! trim nonsense%key made this work |
| 13 | if (nonsense%key /= total%key) call abort |
| 14 | if (len(total%key) /= 2) call abort |
| 15 | end program main |