| 1 |
! { dg-do run } |
| 2 |
! |
| 3 |
! Contributed by Lionel Guez <[email protected]> |
| 4 |
! |
| 5 |
character(len = :), allocatable:: attr_name(:) |
| 6 |
character(6) :: buffer |
| 7 |
type coord_def |
| 8 |
character(len = :), allocatable:: attr_name(:) |
| 9 |
end type coord_def |
| 10 |
type(coord_def) coordinates |
| 11 |
attr_name = ["units"] |
| 12 |
write (buffer, *) attr_name |
| 13 |
if (buffer .ne. " units") stop 1 |
| 14 |
coordinates = coord_def(attr_name) |
| 15 |
write (buffer, *) coordinates%attr_name |
| 16 |
if (buffer .ne. " units") stop 2 |
| 17 |
deallocate (attr_name) |
| 18 |
deallocate (coordinates%attr_name) |
| 19 |
end |