re PR fortran/30869 ([4.1 only] Rejects pointer to integer as loop variable)

2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/30869
	* match.c(gfc_match_iterator):  Remove conflict between
	loop variable and pointer.

2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/30869
	* gfortran.dg/do_pointer_1.f90:  New test.

From-SVN: r122176
This commit is contained in:
Thomas Koenig 2007-02-20 21:50:20 +00:00 committed by Thomas Koenig
parent 41e56bf7d6
commit b241831b6d
4 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/30869
* match.c(gfc_match_iterator): Remove conflict between
loop variable and pointer.
2007-02-20 Tobias Burnus <burnus@net-b.de>
PR fortran/30522

View File

@ -534,12 +534,6 @@ gfc_match_iterator (gfc_iterator *iter, int init_flag)
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;

View File

@ -1,3 +1,8 @@
2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/30869
* gfortran.dg/do_pointer_1.f90: New test.
2007-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/torture/builtin-nonneg-1.c: Add checks for scalb, scalbn

View File

@ -0,0 +1,9 @@
! { 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