OSDN Git Service

2005-12-23 Paul Thomas <pault@gcc.gnu.org>
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Dec 2005 06:41:52 +0000 (06:41 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Dec 2005 06:41:52 +0000 (06:41 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109009 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/initialization_1.f90

index fa5bb4f..4453d89 100644 (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
index 5f5ce56..4966a63 100644 (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.  */
index b5f1063..9c8789a 100644 (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
index 3ce6b10..4e85269 100644 (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