[patch, fortran] Fix PR 30869
Thomas Koenig
Thomas.Koenig@online.de
Tue Feb 20 20:51:00 GMT 2007
:ADDPATCH fortran:
Hello world,
here's a patch for PR 30869, one of Joost's new series of bug reports.
Regression-tested on i686-pc-linux.gnu.
OK for trunk and (after a week or so) 4.2?
Thomas
2006-02-20 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/30869
* match.c: Remove conflict between loop variable and pointer.
2006-02-20 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/30869
* gfortran.dg/do_pointer_1.f90: New test.
-------------- next part --------------
Index: match.c
===================================================================
--- match.c (revision 122136)
+++ match.c (working copy)
@@ -534,12 +534,6 @@ gfc_match_iterator (gfc_iterator *iter,
goto cleanup;
}
- if (var->symtree->n.sym->attr.pointer)
- {
- gfc_error ("Loop variable at %C cannot have the POINTER attribute");
- goto cleanup;
- }
-
m = init_flag ? gfc_match_init_expr (&e1) : gfc_match_expr (&e1);
if (m == MATCH_NO)
goto syntax;
-------------- next part --------------
! { dg-do compile }
! PR 30869 - pointer loop variables were wrongly rejected.
program main
integer, pointer :: i
allocate (i)
do i=1,10
end do
deallocate (i)
end program main
More information about the Fortran
mailing list