re PR fortran/33276 (465.tonto in SPEC CPU 2006 fails to compile)
gcc/fortran/ 2007-09-02 H.J. Lu <hongjiu.lu@intel.com> PR fortran/33276 * array.c (expand_iterator): Initialize frame.prev. gcc/testsuite/ 2007-09-02 H.J. Lu <hongjiu.lu@intel.com> PR fortran/33276 * gfortran.fortran-torture/compile/pr33276.f90: New. From-SVN: r128024
This commit is contained in:
parent
ead8827dd6
commit
669141025a
@ -1,3 +1,8 @@
|
||||
2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR fortran/33276
|
||||
* array.c (expand_iterator): Initialize frame.prev.
|
||||
|
||||
2007-08-31 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/33232
|
||||
|
@ -1281,6 +1281,7 @@ expand_iterator (gfc_constructor *c)
|
||||
|
||||
mpz_init (trip);
|
||||
mpz_init (frame.value);
|
||||
frame.prev = NULL;
|
||||
|
||||
start = gfc_copy_expr (c->iterator->start);
|
||||
if (gfc_simplify_expr (start, 1) == FAILURE)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR fortran/33276
|
||||
* gfortran.fortran-torture/compile/pr33276.f90: New.
|
||||
|
||||
2007-09-02 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
PR middle-end/33272
|
||||
|
27
gcc/testsuite/gfortran.fortran-torture/compile/pr33276.f90
Normal file
27
gcc/testsuite/gfortran.fortran-torture/compile/pr33276.f90
Normal file
@ -0,0 +1,27 @@
|
||||
! PR fortran/33276
|
||||
! this used to crash due to an uninitialized variable in expand_iterator.
|
||||
|
||||
module foo
|
||||
type buffer_type
|
||||
integer(kind=kind(1)) :: item_end
|
||||
character(256) :: string
|
||||
end type
|
||||
type textfile_type
|
||||
type(buffer_type) :: buffer
|
||||
end type
|
||||
contains
|
||||
function rest_of_line(self) result(res)
|
||||
type(textfile_type) :: self
|
||||
intent(inout) :: self
|
||||
character(128) :: res
|
||||
res = self%buffer%string(self%buffer%item_end+1: )
|
||||
end function
|
||||
|
||||
subroutine read_intvec_ptr(v)
|
||||
integer(kind=kind(1)), dimension(:), pointer :: v
|
||||
integer(kind=kind(1)) :: dim,f,l,i
|
||||
|
||||
if (dim>0) then; v = (/ (i, i=f,l) /)
|
||||
end if
|
||||
end subroutine
|
||||
end
|
Loading…
Reference in New Issue
Block a user