re PR fortran/36192 (ICE with wrong index types and bad parens)
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/36192 * interface.c (get_expr_storage_size): Check for INTEGER type before calling gmp routines. 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/36192 * gfortran.dg/pr36192_1.f90: New test. From-SVN: r229590
This commit is contained in:
parent
dc0f176a1c
commit
edcc76d5ae
@ -1,8 +1,15 @@
|
||||
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/36192
|
||||
* interface.c (get_expr_storage_size): Check for INTEGER type before
|
||||
calling gmp routines.
|
||||
|
||||
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/68154
|
||||
* decl.c (add_init_expr_to_sym): if the char length in the typespec
|
||||
is NULL, check for and use a constructor.
|
||||
|
||||
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/68054
|
||||
|
@ -2455,7 +2455,9 @@ get_expr_storage_size (gfc_expr *e)
|
||||
{
|
||||
if (ref->u.ar.as->lower[i] && ref->u.ar.as->upper[i]
|
||||
&& ref->u.ar.as->lower[i]->expr_type == EXPR_CONSTANT
|
||||
&& ref->u.ar.as->upper[i]->expr_type == EXPR_CONSTANT)
|
||||
&& ref->u.ar.as->lower[i]->ts.type == BT_INTEGER
|
||||
&& ref->u.ar.as->upper[i]->expr_type == EXPR_CONSTANT
|
||||
&& ref->u.ar.as->upper[i]->ts.type == BT_INTEGER)
|
||||
elements *= mpz_get_si (ref->u.ar.as->upper[i]->value.integer)
|
||||
- mpz_get_si (ref->u.ar.as->lower[i]->value.integer)
|
||||
+ 1L;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/36192
|
||||
* gfortran.dg/pr36192_1.f90: New test.
|
||||
|
||||
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/68154
|
||||
|
12
gcc/testsuite/gfortran.dg/pr36192_1.f90
Normal file
12
gcc/testsuite/gfortran.dg/pr36192_1.f90
Normal file
@ -0,0 +1,12 @@
|
||||
! { dg-do compile }
|
||||
! PR fortran/36192
|
||||
program three_body
|
||||
real, parameter :: n = 2, d = 2
|
||||
real, dimension(n,d) :: x_hq ! { dg-error "of INTEGER type|of INTEGER type" }
|
||||
call step(x_hq)
|
||||
contains
|
||||
subroutine step(x)
|
||||
real, dimension(:,:), intent(in) :: x
|
||||
end subroutine step
|
||||
end program three_body
|
||||
! { dg-prune-output "must have constant shape" }
|
Loading…
x
Reference in New Issue
Block a user