re PR fortran/57285 ([OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy)
2013-07-27 Janus Weil <janus@gcc.gnu.org> PR fortran/57285 * check.c (dim_rank_check): Re-enable this check for CLASS arrays. 2013-07-27 Janus Weil <janus@gcc.gnu.org> PR fortran/57285 * gfortran.dg/class_array_19.f90: New. From-SVN: r201284
This commit is contained in:
parent
538e2a82e9
commit
c970dc0459
4 changed files with 24 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-07-27 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/57285
|
||||
* check.c (dim_rank_check): Re-enable this check for CLASS arrays.
|
||||
|
||||
2013-07-25 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/57966
|
||||
|
|
|
@ -608,9 +608,6 @@ dim_rank_check (gfc_expr *dim, gfc_expr *array, int allow_assumed)
|
|||
if (dim->expr_type != EXPR_CONSTANT)
|
||||
return true;
|
||||
|
||||
if (array->ts.type == BT_CLASS)
|
||||
return true;
|
||||
|
||||
if (array->expr_type == EXPR_FUNCTION && array->value.function.isym
|
||||
&& array->value.function.isym->id == GFC_ISYM_SPREAD)
|
||||
rank = array->rank + 1;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-07-27 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/57285
|
||||
* gfortran.dg/class_array_19.f90: New.
|
||||
|
||||
2013-07-27 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.dg/vect/pr57705.c: Adjust for a !vect_pack_trunc target.
|
||||
|
|
14
gcc/testsuite/gfortran.dg/class_array_19.f90
Normal file
14
gcc/testsuite/gfortran.dg/class_array_19.f90
Normal file
|
@ -0,0 +1,14 @@
|
|||
! { dg-do compile }
|
||||
!
|
||||
! PR 57285: [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy
|
||||
!
|
||||
! Contributed by Lorenz Hüdepohl <bugs@stellardeath.org>
|
||||
|
||||
type type_t
|
||||
end type
|
||||
contains
|
||||
subroutine foo(a)
|
||||
class(type_t), intent(in) :: a(:)
|
||||
type(type_t) :: c(size(a,dim=2)) ! { dg-error "is not a valid dimension index" }
|
||||
end subroutine
|
||||
end
|
Loading…
Add table
Reference in a new issue