| 1 |
! PR fortran/33276 |
| 2 |
! this used to crash due to an uninitialized variable in expand_iterator. |
| 3 |
|
| 4 |
module foo |
| 5 |
type buffer_type |
| 6 |
integer(kind=kind(1)) :: item_end |
| 7 |
character(256) :: string |
| 8 |
end type |
| 9 |
type textfile_type |
| 10 |
type(buffer_type) :: buffer |
| 11 |
end type |
| 12 |
contains |
| 13 |
function rest_of_line(self) result(res) |
| 14 |
type(textfile_type) :: self |
| 15 |
intent(inout) :: self |
| 16 |
character(128) :: res |
| 17 |
res = self%buffer%string(self%buffer%item_end+1: ) |
| 18 |
end function |
| 19 |
|
| 20 |
subroutine read_intvec_ptr(v) |
| 21 |
integer(kind=kind(1)), dimension(:), pointer :: v |
| 22 |
integer(kind=kind(1)) :: dim,f,l,i |
| 23 |
|
| 24 |
if (dim>0) then; v = (/ (i, i=f,l) /) |
| 25 |
end if |
| 26 |
end subroutine |
| 27 |
end |