]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/25029 (Assumed size array can be associated with array pointer without...
authorPaul Thomas <pault@gcc.gnu.org>
Fri, 23 Dec 2005 06:41:52 +0000 (06:41 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Fri, 23 Dec 2005 06:41:52 +0000 (06:41 +0000)
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

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

index fa5bb4f1d2782424b9f86f90d06d6ac2673bb0f4..4453d8924b4013a20c362e3ec13da36da15b5b90 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 5f5ce5694e352064589993b5a96ab4f6455e752a..4966a633c2a5443b23ac0b47edc108b7c5fb8a11 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 b5f10631b75ffee6a7b6e3c32fd892db050b9968..9c8789a0e6bf2e2a666cc4dee5dea41b82421ca9 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 3ce6b1013392349e3d5d3d5e7cd9656f828a1aa1..4e852697c92c6ba97b3826a6d6e5142f45ce864d 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