re PR fortran/25029 (Assumed size array can be associated with array pointer without upper bound of last dimension)

2005-12-23  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/25029
	PR fortran/21256
	*resolve.c(resolve_function): Remove assumed size checking for SIZE
	and UBOUND and rely on their built-in checking.

2005-12-23  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/25029
	PR fortran/21256
	*gfortran.dg/initialization_1.f90: Add test of SIZE.

From-SVN: r109009
This commit is contained in:
Paul Thomas 2005-12-23 06:41:52 +00:00
parent 01ad6816a1
commit dd55e286d4
4 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2005-12-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25029
PR fortran/21256
*resolve.c(resolve_function): Remove assumed size checking for SIZE
and UBOUND and rely on their built-in checking.
2005-12-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/18990

View File

@ -1231,7 +1231,9 @@ resolve_function (gfc_expr * expr)
else if (expr->value.function.actual != NULL
&& expr->value.function.isym != NULL
&& strcmp (expr->value.function.isym->name, "lbound"))
&& strcmp (expr->value.function.isym->name, "lbound")
&& strcmp (expr->value.function.isym->name, "ubound")
&& strcmp (expr->value.function.isym->name, "size"))
{
/* Array instrinsics must also have the last upper bound of an
asumed size array argument. */

View File

@ -1,3 +1,9 @@
2005-12-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25029
PR fortran/21256
*gfortran.dg/initialization_1.f90: Add test of SIZE.
2005-12-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25307

View File

@ -20,6 +20,7 @@ contains
real(8) :: x (1:2, *)
real(8) :: y (0:,:)
integer :: i
! However, this gives a warning because it is an initialization expression.
integer :: l1 = len (ch1) ! { dg-warning "assumed character length variable" }
@ -29,9 +30,11 @@ contains
integer :: m2(2) = shape (x) ! { dg-error "assumed size array" }
! These are warnings because they are gfortran extensions.
integer :: m3 = size (x, 1) ! { dg-warning "Evaluation of nonstandard initialization" }
integer :: m4(2) = shape (z) ! { dg-warning "Evaluation of nonstandard initialization" }
! This does not depend on non-constant properties.
real(8) :: big = huge (x)
end subroutine foo
end module const