PR fortran/30882
* check.c (dim_rank_check): The shape of subsections of
assumed-size arrays is known.
2007-03-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30882
* gfortran.dg/size_dim.f90: New test.
-- Diese und die folgenden Zeilen werden ignoriert --
M gcc/testsuite/ChangeLog
A gcc/testsuite/gfortran.dg/size_dim.f90
M gcc/fortran/ChangeLog
M gcc/fortran/check.c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122503
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-03-03 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/30882
+ * check.c (dim_rank_check): The shape of subsections of
+ assumed-size arrays is known.
+
2007-03-02 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
ar = gfc_find_array_ref (array);
rank = array->rank;
- if (ar->as->type == AS_ASSUMED_SIZE && !allow_assumed)
+ if (ar->as->type == AS_ASSUMED_SIZE
+ && !allow_assumed
+ && ar->type != AR_ELEMENT
+ && ar->type != AR_SECTION)
rank--;
if (mpz_cmp_ui (dim->value.integer, 1) < 0
+2007-03-03 Paul Thomas <pault@gcc.gnu.org>
+ Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/30882
+ * gfortran.dg/size_dim.f90: New test.
+
2007-03-02 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
--- /dev/null
+! { dg-do "run" }
+! Check size with initialization expression value for dim=
+! PR fortran/30882
+!
+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
+!
+program main
+ integer :: a(10)
+ call S1(a)
+contains
+ subroutine S1(a)
+ integer :: a(*)
+ if(size(a(1:10),1) /= 10) call abort()
+ end subroutine S1
+end program main