Commit 86288ff0 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/34759 (Assumed size array reference not allowed in SHAPE…

re PR fortran/34759 (Assumed size array reference not allowed in SHAPE intrinsic, even though last subscript specified)

2008-01-13  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34759
        * check.c (gfc_check_shape): Accept array ranges of
        assumed-size arrays.

2008-01-13  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34759
        * gfortran.dg/assumed_size_refs_4.f90: New.

From-SVN: r131511
parent 08ffbdad
2008-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34759
* check.c (gfc_check_shape): Accept array ranges of
assumed-size arrays.
2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/34432 PR fortran/34432
......
...@@ -2394,7 +2394,7 @@ gfc_check_shape (gfc_expr *source) ...@@ -2394,7 +2394,7 @@ gfc_check_shape (gfc_expr *source)
ar = gfc_find_array_ref (source); ar = gfc_find_array_ref (source);
if (ar->as && ar->as->type == AS_ASSUMED_SIZE) if (ar->as && ar->as->type == AS_ASSUMED_SIZE && ar->type == AR_FULL)
{ {
gfc_error ("'source' argument of 'shape' intrinsic at %L must not be " gfc_error ("'source' argument of 'shape' intrinsic at %L must not be "
"an assumed size array", &source->where); "an assumed size array", &source->where);
......
2008-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34759
* gfortran.dg/assumed_size_refs_4.f90: New.
2008-01-13 Eric Botcazou <ebotcazou@adacore.com> 2008-01-13 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/unchecked_convert1.adb. * gnat.dg/unchecked_convert1.adb.
! { dg-do compile }
!
! PR fortran/34759
! gfortran was before rejecting passing an assumed-size array
! where the last dimension was specified.
!
! Test case provided by Dick Hendickson.
!
subroutine j_assumed_size(A,N)
dimension A(10,11,12,*), k(3), l(3), m(4)
m = shape(A(:,:,:,:N)) ! OK
l = shape(A(:,:,:,3)) ! OK
m = shape(A(:,:,:,:)) ! { dg-error "upper bound of assumed size array" }
m = shape(A) ! { dg-error "must not be an assumed size array" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment